diff options
author | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2011-12-28 05:59:39 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-01-03 22:36:22 +0100 |
commit | e9ce8a448011a651e7510be4c4851e68c922b3e2 (patch) | |
tree | 9ddb0fd49b7904823891e91c40a2127d9079ff33 | |
parent | e9378b42b11a405c3e8d924bcf38d4ff121211b2 (diff) | |
download | ffmpeg-e9ce8a448011a651e7510be4c4851e68c922b3e2.tar.gz |
Fix a crash when reading gray pam files.
Fixes ticket #837.
(cherry picked from commit 190a0998c353879c8f79f47678752dbb8fa62bb2)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/pnm.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/pnm.c b/libavcodec/pnm.c index dfc18d6013..b52cd27f72 100644 --- a/libavcodec/pnm.c +++ b/libavcodec/pnm.c @@ -107,6 +107,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; |