diff options
author | Carl Eugen Hoyos <cehoyos@rainbow.studorg.tuwien.ac.at> | 2011-01-10 22:09:52 +0000 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@rainbow.studorg.tuwien.ac.at> | 2011-01-10 22:09:52 +0000 |
commit | 8219782a6da9e203f6a4e31dddc7888133a5c5f6 (patch) | |
tree | 356771e835514a8860a1fdeba2180520374831a5 /libavcodec/pnm.c | |
parent | c56e71309ec1a585ed4d4dc11ae0ba3ca7d19618 (diff) | |
download | ffmpeg-8219782a6da9e203f6a4e31dddc7888133a5c5f6.tar.gz |
Do not stop decoding on pnm files with negative maxval.
Originally committed as revision 26304 to svn://svn.ffmpeg.org/ffmpeg/trunk
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 43438b7cef..c104e23427 100644 --- a/libavcodec/pnm.c +++ b/libavcodec/pnm.c @@ -142,7 +142,7 @@ int ff_pnm_decode_header(AVCodecContext *avctx, PNMContext * const s) s->maxval = atoi(buf1); if (s->maxval <= 0) { av_log(avctx, AV_LOG_ERROR, "Invalid maxval: %d\n", s->maxval); - return -1; + s->maxval = 255; } if (s->maxval >= 256) { if (avctx->pix_fmt == PIX_FMT_GRAY8) { |