diff options
author | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2007-11-30 21:51:34 +0000 |
---|---|---|
committer | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2007-11-30 21:51:34 +0000 |
commit | 4c1e509c11e7b17f7c518bc7f6d366d110b034da (patch) | |
tree | 66ea5c0a06ade965307d6f327e7d65434b461630 | |
parent | 2d4e0c1aa9b12d6d962aecce05b0c65a605d078c (diff) | |
download | ffmpeg-4c1e509c11e7b17f7c518bc7f6d366d110b034da.tar.gz |
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
-rw-r--r-- | libavcodec/wmadec.c | 3 |
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; |