summaryrefslogtreecommitdiff
path: root/libavcodec/wmadec.c
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2007-11-30 21:51:34 +0000
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2007-11-30 21:51:34 +0000
commit4c1e509c11e7b17f7c518bc7f6d366d110b034da (patch)
tree66ea5c0a06ade965307d6f327e7d65434b461630 /libavcodec/wmadec.c
parent2d4e0c1aa9b12d6d962aecce05b0c65a605d078c (diff)
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
Diffstat (limited to 'libavcodec/wmadec.c')
-rw-r--r--libavcodec/wmadec.c3
1 files changed, 3 insertions, 0 deletions
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;