diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-03-20 14:13:01 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-03-20 14:13:01 +0100 |
commit | 8f394a6cf8efe0fa3bb231db7d3a03e8363a3ddd (patch) | |
tree | af7db43a1bf4b9f5ba3ca8114c2f1e447df75df4 | |
parent | 309d8ec19bf7b7137edd6a6960e3cd97b80448de (diff) | |
download | ffmpeg-8f394a6cf8efe0fa3bb231db7d3a03e8363a3ddd.tar.gz |
pngdec: print error message for truncated pngs even if we output them
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/pngdec.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c index c8d4758848..8901874690 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 */ |