aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/pnm.c
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <cehoyos@ag.or.at>2011-12-28 05:59:39 +0100
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2011-12-28 05:59:39 +0100
commit190a0998c353879c8f79f47678752dbb8fa62bb2 (patch)
tree993a488269c2db8167219bddd49ebff2f541af1b /libavcodec/pnm.c
parentc1bc1967f30e2e9ac0ffecbc4aadad873c1b586c (diff)
downloadffmpeg-190a0998c353879c8f79f47678752dbb8fa62bb2.tar.gz
Fix a crash when reading gray pam files.
Fixes ticket #837.
Diffstat (limited to 'libavcodec/pnm.c')
-rw-r--r--libavcodec/pnm.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/pnm.c b/libavcodec/pnm.c
index 09530f8131..680034a3d5 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;