[FFmpeg-cvslog] pngdec: print error message for truncated pngs even if we output them
Michael Niedermayer
git at videolan.org
Tue Mar 20 14:31:51 CET 2012
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Mar 20 14:13:01 2012 +0100| [8f394a6cf8efe0fa3bb231db7d3a03e8363a3ddd] | committer: Michael Niedermayer
pngdec: print error message for truncated pngs even if we output them
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8f394a6cf8efe0fa3bb231db7d3a03e8363a3ddd
---
libavcodec/pngdec.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c
index c8d4758..8901874 100644
--- a/libavcodec/pngdec.c
+++ b/libavcodec/pngdec.c
@@ -594,8 +594,9 @@ static int decode_frame(AVCodecContext *avctx,
}
break;
case MKTAG('I', 'E', 'N', 'D'):
- if (!(s->state & (PNG_ALLIMAGE|PNG_IDAT))) {
+ if (!(s->state & PNG_ALLIMAGE))
av_log(avctx, AV_LOG_ERROR, "IEND without all image\n");
+ if (!(s->state & (PNG_ALLIMAGE|PNG_IDAT))) {
goto fail;
}
bytestream2_skip(&s->gb, 4); /* crc */
More information about the ffmpeg-cvslog
mailing list