summaryrefslogtreecommitdiff
path: root/libavcodec/pnm.c
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <cehoyos@ag.or.at>2013-07-28 18:12:23 +0200
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2013-07-28 18:12:23 +0200
commit7e8e8ba9cc2b074b988e8ab28f69cfc5d454d674 (patch)
tree919e3122a91f6685041377c1b31eb57050137301 /libavcodec/pnm.c
parentae4dc0b37aa8aee5f7bca294d1da2a22ff3db68d (diff)
Assume gray8 if 1 < maxval <= 255 in pgm.
Diffstat (limited to 'libavcodec/pnm.c')
-rw-r--r--libavcodec/pnm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/pnm.c b/libavcodec/pnm.c
index 308457bbe9..6e2e96c403 100644
--- a/libavcodec/pnm.c
+++ b/libavcodec/pnm.c
@@ -116,7 +116,7 @@ int ff_pnm_decode_header(AVCodecContext *avctx, PNMContext * const s)
if (depth == 1) {
if (maxval == 1) {
avctx->pix_fmt = AV_PIX_FMT_MONOBLACK;
- } else if (maxval == 255) {
+ } else if (maxval < 256) {
avctx->pix_fmt = AV_PIX_FMT_GRAY8;
} else {
avctx->pix_fmt = AV_PIX_FMT_GRAY16BE;