[FFmpeg-cvslog] r26304 - trunk/libavcodec/pnm.c
cehoyos
subversion
Mon Jan 10 23:09:52 CET 2011
Author: cehoyos
Date: Mon Jan 10 23:09:52 2011
New Revision: 26304
Log:
Do not stop decoding on pnm files with negative maxval.
Modified:
trunk/libavcodec/pnm.c
Modified: trunk/libavcodec/pnm.c
==============================================================================
--- trunk/libavcodec/pnm.c Mon Jan 10 22:14:54 2011 (r26303)
+++ trunk/libavcodec/pnm.c Mon Jan 10 23:09:52 2011 (r26304)
@@ -142,7 +142,7 @@ int ff_pnm_decode_header(AVCodecContext
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) {
More information about the ffmpeg-cvslog
mailing list