diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-03-19 23:40:03 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-03-20 00:03:19 +0100 |
commit | 479fb7b8afcf0711b93b48c7d634e9f464d8b336 (patch) | |
tree | 53f46f6c9f02c4e8b8d9ad1a86f27078e520dc2f /libavcodec/zmbv.c | |
parent | 87c1783c77f4e688edceec165eaef287bd127622 (diff) | |
parent | 18ba94c6f9e08fc71cb5c4944bc6e4e1196e4634 (diff) | |
download | ffmpeg-479fb7b8afcf0711b93b48c7d634e9f464d8b336.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master: (35 commits)
fix space type in Changelog
ZeroCodec Decoder
RealAudio Lossless decoder
rtpenc: Use AVFormatContext.packet_size instead of a private option
url: Document the expected behaviour of url_read
libavformat: Use AVFormatContext.probesize in init_input
docs: Fix a stray reference to tags in the generic doxy on dicts
cosmetics: Align some AVInput/OutputFormat declarations
zmbv: check decompress result
zmbv: correct indentation
adpcm: convert adpcm_thp to bytestream2.
adpcm: convert adpcm_yamaha to bytestream2.
adpcm: convert adpcm_swf to bytestream2.
adpcm: convert adpcm_sbpro to bytestream2.
adpcm: convert adpcm_ct to bytestream2.
adpcm: convert adpcm_ima_amv/smjpeg to bytestream2.
adpcm: convert adpcm_ea_xas to bytestream2.
adpcm: convert adpcm_ea_r1/2/3 to bytestream2.
adpcm: convert ea_maxis_xa to bytestream2.
adpcm: convert adpcm_ea to bytestream2.
...
Conflicts:
Changelog
libavcodec/Makefile
libavcodec/adpcm.c
libavcodec/allcodecs.c
libavcodec/avcodec.h
libavcodec/version.h
libavcodec/zerocodec.c
libavcodec/zmbv.c
libavformat/riff.c
libavformat/url.h
tests/ref/fate/truemotion1-15
tests/ref/fate/truemotion1-24
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/zmbv.c')
-rw-r--r-- | libavcodec/zmbv.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/libavcodec/zmbv.c b/libavcodec/zmbv.c index 38a0d467ff..fdec944450 100644 --- a/libavcodec/zmbv.c +++ b/libavcodec/zmbv.c @@ -495,10 +495,10 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac c->decode_intra= decode_intra; } - if (c->decode_intra == NULL) { - av_log(avctx, AV_LOG_ERROR, "Error! Got no format or no keyframe!\n"); - return AVERROR_INVALIDDATA; - } + if (c->decode_intra == NULL) { + av_log(avctx, AV_LOG_ERROR, "Error! Got no format or no keyframe!\n"); + return AVERROR_INVALIDDATA; + } if (c->comp == 0) { //Uncompressed data memcpy(c->decomp_buf, buf, len); @@ -509,7 +509,11 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac c->zstream.avail_in = len; c->zstream.next_out = c->decomp_buf; c->zstream.avail_out = c->decomp_size; - inflate(&c->zstream, Z_FINISH); + zret = inflate(&c->zstream, Z_SYNC_FLUSH); + if (zret != Z_OK && zret != Z_STREAM_END) { + av_log(avctx, AV_LOG_ERROR, "inflate error %d\n", zret); + return AVERROR_INVALIDDATA; + } c->decomp_len = c->zstream.total_out; } if (c->flags & ZMBV_KEYFRAME) { |