Commit 8219782a authored by Carl Eugen Hoyos's avatar Carl Eugen Hoyos

Do not stop decoding on pnm files with negative maxval.

Originally committed as revision 26304 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent c56e7130
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment