diff options
author | Kostya Shishkov <kostya.shishkov@gmail.com> | 2012-03-21 19:10:43 +0100 |
---|---|---|
committer | Kostya Shishkov <kostya.shishkov@gmail.com> | 2012-03-22 07:16:47 +0100 |
commit | 87818103a0d8e5021b950ea5906031a20d0d193b (patch) | |
tree | 741a2b96fb21e7c5f5f39e934ae8276ebe2c036b /libavcodec/wmalosslessdec.c | |
parent | 6aba117f1273c7704312c6d892c9f552fa0661bb (diff) | |
download | ffmpeg-87818103a0d8e5021b950ea5906031a20d0d193b.tar.gz |
wmall: output packet only if we have decoded some samples
Also set CODEC_CAP_DELAY to indicate that decoder may still have some
undecoded data left in internal buffer.
Diffstat (limited to 'libavcodec/wmalosslessdec.c')
-rw-r--r-- | libavcodec/wmalosslessdec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/wmalosslessdec.c b/libavcodec/wmalosslessdec.c index 6bd8bfbc0a..795642e271 100644 --- a/libavcodec/wmalosslessdec.c +++ b/libavcodec/wmalosslessdec.c @@ -1229,7 +1229,7 @@ static int decode_packet(AVCodecContext *avctx, void *data, int *got_frame_ptr, } *(AVFrame *)data = s->frame; - *got_frame_ptr = 1; + *got_frame_ptr = s->frame.nb_samples > 0; s->packet_offset = get_bits_count(gb) & 7; return (s->packet_loss) ? AVERROR_INVALIDDATA : get_bits_count(gb) >> 3; @@ -1243,6 +1243,6 @@ AVCodec ff_wmalossless_decoder = { .priv_data_size = sizeof(WmallDecodeCtx), .init = decode_init, .decode = decode_packet, - .capabilities = CODEC_CAP_SUBFRAMES | CODEC_CAP_DR1, + .capabilities = CODEC_CAP_SUBFRAMES | CODEC_CAP_DR1 | CODEC_CAP_DELAY, .long_name = NULL_IF_CONFIG_SMALL("Windows Media Audio Lossless"), }; |