aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/pngdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-03-20 14:13:01 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-03-20 14:13:01 +0100
commit8f394a6cf8efe0fa3bb231db7d3a03e8363a3ddd (patch)
treeaf7db43a1bf4b9f5ba3ca8114c2f1e447df75df4 /libavcodec/pngdec.c
parent309d8ec19bf7b7137edd6a6960e3cd97b80448de (diff)
downloadandroid_external_ffmpeg-8f394a6cf8efe0fa3bb231db7d3a03e8363a3ddd.tar.gz
android_external_ffmpeg-8f394a6cf8efe0fa3bb231db7d3a03e8363a3ddd.tar.bz2
android_external_ffmpeg-8f394a6cf8efe0fa3bb231db7d3a03e8363a3ddd.zip
pngdec: print error message for truncated pngs even if we output them
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/pngdec.c')
-rw-r--r--libavcodec/pngdec.c3
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 */