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
This commit is contained in:
Reimar Döffinger 2007-11-30 21:51:34 +00:00
parent 2d4e0c1aa9
commit 4c1e509c11

View File

@ -768,6 +768,9 @@ static int wma_decode_superframe(AVCodecContext *avctx,
s->last_superframe_len = 0; s->last_superframe_len = 0;
return 0; return 0;
} }
if (buf_size < s->block_align)
return 0;
buf_size = s->block_align;
samples = data; samples = data;