Commit 75426614 authored by stefang's avatar stefang

avoid indeterminate order of accessing src


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@16855 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 6a58a2d0
...@@ -1300,9 +1300,9 @@ static int adpcm_decode_frame(AVCodecContext *avctx, ...@@ -1300,9 +1300,9 @@ static int adpcm_decode_frame(AVCodecContext *avctx,
} }
for (channel=0; channel<avctx->channels; channel++) { for (channel=0; channel<avctx->channels; channel++) {
srcC = src + (big_endian ? bytestream_get_be32(&src) srcC = src + (avctx->channels-channel) * 4;
: bytestream_get_le32(&src)) srcC += (big_endian ? bytestream_get_be32(&src)
+ (avctx->channels-channel-1) * 4; : bytestream_get_le32(&src));
samplesC = samples + channel; samplesC = samples + channel;
if (avctx->codec->id == CODEC_ID_ADPCM_EA_R1) { if (avctx->codec->id == CODEC_ID_ADPCM_EA_R1) {
......
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