[FFmpeg-cvslog] Assume gray8 if 1 < maxval <= 255 in pgm.
Carl Eugen Hoyos
git at videolan.org
Sun Jul 28 19:27:47 CEST 2013
ffmpeg | branch: master | Carl Eugen Hoyos <cehoyos at ag.or.at> | Sun Jul 28 18:12:23 2013 +0200| [7e8e8ba9cc2b074b988e8ab28f69cfc5d454d674] | committer: Carl Eugen Hoyos
Assume gray8 if 1 < maxval <= 255 in pgm.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7e8e8ba9cc2b074b988e8ab28f69cfc5d454d674
---
libavcodec/pnm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/pnm.c b/libavcodec/pnm.c
index 308457b..6e2e96c 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;
More information about the ffmpeg-cvslog
mailing list