[FFmpeg-devel] [PATCH]Do not stop decoding on pnm files with negative maxval
Carl Eugen Hoyos
cehoyos
Mon Jan 10 12:03:13 CET 2011
Hi!
I believe Reimar requested this change on -cvslog.
Please comment, Carl Eugen
-------------- next part --------------
Index: libavcodec/pnm.c
===================================================================
--- libavcodec/pnm.c (revision 26292)
+++ libavcodec/pnm.c (working copy)
@@ -142,7 +142,7 @@
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-devel
mailing list