[FFmpeg-cvslog] Decode png images without iend chunk.

Carl Eugen Hoyos git at videolan.org
Tue Mar 11 15:45:20 CET 2014


ffmpeg | branch: master | Carl Eugen Hoyos <cehoyos at ag.or.at> | Tue Mar 11 09:56:38 2014 +0100| [666749f6694510764253ed5602ed5d1cdcfb243f] | committer: Carl Eugen Hoyos

Decode png images without iend chunk.

Fixes ticket #3357.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=666749f6694510764253ed5602ed5d1cdcfb243f
---

 libavcodec/pngdec.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c
index 516dd41..985517d 100644
--- a/libavcodec/pngdec.c
+++ b/libavcodec/pngdec.c
@@ -546,6 +546,9 @@ static int decode_frame(AVCodecContext *avctx,
     for (;;) {
         if (bytestream2_get_bytes_left(&s->gb) <= 0) {
             av_log(avctx, AV_LOG_ERROR, "No bytes left\n");
+            if (   s->state & PNG_ALLIMAGE
+                && avctx->strict_std_compliance <= FF_COMPLIANCE_NORMAL)
+                goto exit_loop;
             goto fail;
         }
 



More information about the ffmpeg-cvslog mailing list