From: Michael Niedermayer <[email protected]> This avoids a potential infinite loop due to not consuming any packet data.
Signed-off-by: Michael Niedermayer <[email protected]> Signed-off-by: Justin Ruggles <[email protected]> CC:[email protected] --- libavcodec/wmadec.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/libavcodec/wmadec.c b/libavcodec/wmadec.c index e2803bb..8d82ec4 100644 --- a/libavcodec/wmadec.c +++ b/libavcodec/wmadec.c @@ -808,7 +808,8 @@ static int wma_decode_superframe(AVCodecContext *avctx, void *data, buf_size, avctx->block_align); return AVERROR_INVALIDDATA; } - buf_size = avctx->block_align; + if (avctx->block_align) + buf_size = avctx->block_align; init_get_bits(&s->gb, buf, buf_size*8); @@ -908,7 +909,7 @@ static int wma_decode_superframe(AVCodecContext *avctx, void *data, *got_frame_ptr = 1; *(AVFrame *)data = s->frame; - return avctx->block_align; + return buf_size; fail: /* when error, we reset the bit reservoir */ s->last_superframe_len = 0; -- 1.7.1 _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
