Browse Source

adpcm: Fix crash

Fixes half of Ticket794
Bug found by: Oana Stratulat

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n0.10
Michael Niedermayer 13 years ago
parent
commit
608708009f
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      libavcodec/adpcm.c

+ 3
- 0
libavcodec/adpcm.c View File

@@ -818,6 +818,9 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data,
/* Each EA ADPCM frame has a 12-byte header followed by 30-byte pieces,
each coding 28 stereo samples. */

if(avctx->channels != 2)
return AVERROR_INVALIDDATA;

src += 4; // skip sample count (already read)

current_left_sample = (int16_t)bytestream_get_le16(&src);


Loading…
Cancel
Save