diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-03-29 01:41:04 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-03-29 04:11:10 +0200 |
commit | d40ff29cacf9b8ffa1061392a0e9b3056c4882ea (patch) | |
tree | 3b59f4b9a74e209220f0b0dcb90c466e3e4a9b3d /libavcodec/wmalosslessdec.c | |
parent | 99bb88c588ea9a46a06b966b9014394385ebe1c3 (diff) | |
parent | 44257ef4267f01dd698c8ab8abf50fd77136a8ce (diff) | |
download | ffmpeg-streaming-d40ff29cacf9b8ffa1061392a0e9b3056c4882ea.zip ffmpeg-streaming-d40ff29cacf9b8ffa1061392a0e9b3056c4882ea.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
asf: only set index_read if the index contained entries.
cabac: add overread protection to BRANCHLESS_GET_CABAC().
cabac: increment jump locations by one in callers of BRANCHLESS_GET_CABAC().
cabac: remove unused argument from BRANCHLESS_GET_CABAC_UPDATE().
cabac: use struct+offset instead of memory operand in BRANCHLESS_GET_CABAC().
h264: add overread protection to get_cabac_bypass_sign_x86().
h264: reindent get_cabac_bypass_sign_x86().
h264: use struct offsets in get_cabac_bypass_sign_x86().
h264: fix overreads in cabac reader.
wmall: fix seeking.
lagarith: fix buffer overreads.
dvdec: drop unnecessary dv_tablegen.h #include
build: fix doc generation errors in parallel builds
Replace memset(0) by zero initializations.
faandct: Remove FAAN_POSTSCALE define and related code.
dvenc: print allowed profiles if the video doesn't conform to any of them.
avcodec_encode_{audio,video}: only reallocate output packet when it has non-zero size.
FATE: add a test for vp8 with changing frame size.
fate: add kgv1 fate test.
oggdec: calculate correct timestamps in Ogg/FLAC
Conflicts:
libavcodec/4xm.c
libavcodec/cook.c
libavcodec/dvdata.c
libavcodec/dvdsubdec.c
libavcodec/lagarith.c
libavcodec/lagarithrac.c
libavcodec/utils.c
tests/fate/video.mak
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/wmalosslessdec.c')
-rw-r--r-- | libavcodec/wmalosslessdec.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/libavcodec/wmalosslessdec.c b/libavcodec/wmalosslessdec.c index af676f1..4f17a18 100644 --- a/libavcodec/wmalosslessdec.c +++ b/libavcodec/wmalosslessdec.c @@ -903,6 +903,7 @@ static int decode_subframe(WmallDecodeCtx *s) } else if (!s->cdlms[0][0].order) { av_log(s->avctx, AV_LOG_DEBUG, "Waiting for seekable tile\n"); + s->frame.nb_samples = 0; return -1; } @@ -1265,6 +1266,17 @@ static int decode_packet(AVCodecContext *avctx, void *data, int *got_frame_ptr, return (s->packet_loss) ? AVERROR_INVALIDDATA : get_bits_count(gb) >> 3; } +static void flush(AVCodecContext *avctx) +{ + WmallDecodeCtx *s = avctx->priv_data; + s->packet_loss = 1; + s->packet_done = 0; + s->num_saved_bits = 0; + s->frame_offset = 0; + s->next_packet_start = 0; + s->cdlms[0][0].order = 0; + s->frame.nb_samples = 0; +} AVCodec ff_wmalossless_decoder = { .name = "wmalossless", @@ -1273,6 +1285,7 @@ AVCodec ff_wmalossless_decoder = { .priv_data_size = sizeof(WmallDecodeCtx), .init = decode_init, .decode = decode_packet, + .flush = flush, .capabilities = CODEC_CAP_SUBFRAMES | CODEC_CAP_DR1 | CODEC_CAP_DELAY, .long_name = NULL_IF_CONFIG_SMALL("Windows Media Audio Lossless"), }; |