summaryrefslogtreecommitdiff
path: root/libavcodec/pngdec.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/pngdec.c')
-rw-r--r--libavcodec/pngdec.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c
index 18295c550e..c37f73d776 100644
--- a/libavcodec/pngdec.c
+++ b/libavcodec/pngdec.c
@@ -381,8 +381,10 @@ static int png_decode_idat(PNGDecContext *s, int length)
s->zstream.avail_out = s->crow_size;
s->zstream.next_out = s->crow_buf;
}
- if (ret == Z_STREAM_END)
- break;
+ if (ret == Z_STREAM_END && s->zstream.avail_in > 0) {
+ av_log(NULL, AV_LOG_WARNING, "%d undecompressed bytes left in buffer\n", s->zstream.avail_in);
+ return 0;
+ }
}
return 0;
}