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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pull/3/head
Michael Niedermayer 13 years ago
parent 66f71f3b5e
commit 2278ecc434
  1. 2
      libavcodec/vmdav.c

@ -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);

Loading…
Cancel
Save