diff options
author | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2013-07-28 18:12:23 +0200 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2013-07-28 18:12:23 +0200 |
commit | 7e8e8ba9cc2b074b988e8ab28f69cfc5d454d674 (patch) | |
tree | 919e3122a91f6685041377c1b31eb57050137301 /libavcodec/pnm.c | |
parent | ae4dc0b37aa8aee5f7bca294d1da2a22ff3db68d (diff) | |
download | ffmpeg-7e8e8ba9cc2b074b988e8ab28f69cfc5d454d674.tar.gz |
Assume gray8 if 1 < maxval <= 255 in pgm.
Diffstat (limited to 'libavcodec/pnm.c')
-rw-r--r-- | libavcodec/pnm.c | 2 |
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; |