[FFmpeg-cvslog] Fix a crash when reading gray pam files.

Carl Eugen Hoyos git at videolan.org
Wed Dec 28 06:01:17 CET 2011


ffmpeg | branch: master | Carl Eugen Hoyos <cehoyos at ag.or.at> | Wed Dec 28 05:59:39 2011 +0100| [190a0998c353879c8f79f47678752dbb8fa62bb2] | committer: Carl Eugen Hoyos

Fix a crash when reading gray pam files.

Fixes ticket #837.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=190a0998c353879c8f79f47678752dbb8fa62bb2
---

 libavcodec/pnm.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/libavcodec/pnm.c b/libavcodec/pnm.c
index 09530f8..680034a 100644
--- a/libavcodec/pnm.c
+++ b/libavcodec/pnm.c
@@ -109,6 +109,7 @@ int ff_pnm_decode_header(AVCodecContext *avctx, PNMContext * const s)
 
         avctx->width  = w;
         avctx->height = h;
+        s->maxval     = maxval;
         if (depth == 1) {
             if (maxval == 1)
                 avctx->pix_fmt = PIX_FMT_MONOWHITE;



More information about the ffmpeg-cvslog mailing list