[SCM] libav/experimental: Do not stop decoding on pnm files with negative maxval.
siretart at users.alioth.debian.org
siretart at users.alioth.debian.org
Sun Jun 30 17:21:44 UTC 2013
The following commit has been merged in the experimental branch:
commit 8219782a6da9e203f6a4e31dddc7888133a5c5f6
Author: Carl Eugen Hoyos <cehoyos at rainbow.studorg.tuwien.ac.at>
Date: Mon Jan 10 22:09:52 2011 +0000
Do not stop decoding on pnm files with negative maxval.
Originally committed as revision 26304 to svn://svn.ffmpeg.org/ffmpeg/trunk
diff --git a/libavcodec/pnm.c b/libavcodec/pnm.c
index 43438b7..c104e23 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) {
--
Libav/FFmpeg packaging
More information about the pkg-multimedia-commits
mailing list