Commit 2278ecc4 authored by Michael Niedermayer's avatar Michael Niedermayer

vmdav: check that theres enough space for a chunk remaining.

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 66f71f3b
......@@ -618,7 +618,7 @@ static int vmdaudio_decode_frame(AVCodecContext *avctx, void *data,
/* decode audio chunks */
if (audio_chunks > 0) {
buf_end = buf + buf_size;
while (buf < buf_end) {
while ( buf_end - buf >= s->chunk_size) {
if (s->out_bps == 2) {
decode_audio_s16(output_samples_s16, buf, s->chunk_size,
avctx->channels);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment