From 4c1e509c11e7b17f7c518bc7f6d366d110b034da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Reimar=20D=C3=B6ffinger?= Date: Fri, 30 Nov 2007 21:51:34 +0000 Subject: [PATCH] wma_decode_superframe always returns s->block_align, so make sure we actually consume exactly that amount. Fixes sound artefacts (mostly blips) that mysteriously disappeared after e.g. remuxing with mencoder. Originally committed as revision 11115 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/wmadec.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavcodec/wmadec.c b/libavcodec/wmadec.c index 1573e5d783..740f8b34ea 100644 --- a/libavcodec/wmadec.c +++ b/libavcodec/wmadec.c @@ -768,6 +768,9 @@ static int wma_decode_superframe(AVCodecContext *avctx, s->last_superframe_len = 0; return 0; } + if (buf_size < s->block_align) + return 0; + buf_size = s->block_align; samples = data;