diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-09-30 00:40:17 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-09-30 00:40:17 +0200 |
commit | 9834874f8c540773f9a727413e38ba2f6b510e2a (patch) | |
tree | d49cf42c9933ce68b1248ee315ca063c32861f68 /libavcodec/pngdec.c | |
parent | 143a19f5c73b95c177aa03dd41ce85e03e2d13c2 (diff) | |
parent | a81cad8f86d1feb7e4bfae29e43f3e994935a5c7 (diff) | |
download | ffmpeg-9834874f8c540773f9a727413e38ba2f6b510e2a.tar.gz |
Merge commit 'a81cad8f86d1feb7e4bfae29e43f3e994935a5c7'
* commit 'a81cad8f86d1feb7e4bfae29e43f3e994935a5c7':
pngdec: Stop trying to decode once inflate returns Z_STREAM_END
Conflicts:
libavcodec/pngdec.c
See: 65bf9a44d7b0295e03463fd143499ab5b85d0cb7
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/pngdec.c')
-rw-r--r-- | libavcodec/pngdec.c | 6 |
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; } |