diff options
author | Stefan Gehrer <stefan.gehrer@gmx.de> | 2009-01-30 06:38:46 +0000 |
---|---|---|
committer | Stefan Gehrer <stefan.gehrer@gmx.de> | 2009-01-30 06:38:46 +0000 |
commit | 2ed421134e8fe2674a2943e86c8045e0ab7c2ce5 (patch) | |
tree | 625fb37d1a314eaa56bf514ed80c3c7acfa9237b | |
parent | 04e76709063d730998b5d1af69354af96c2bae62 (diff) | |
download | ffmpeg-2ed421134e8fe2674a2943e86c8045e0ab7c2ce5.tar.gz |
avoid indeterminate order of accessing src
Originally committed as revision 16855 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavcodec/adpcm.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/adpcm.c b/libavcodec/adpcm.c index 883b723c6f..87f4f4448f 100644 --- a/libavcodec/adpcm.c +++ b/libavcodec/adpcm.c @@ -1300,9 +1300,9 @@ static int adpcm_decode_frame(AVCodecContext *avctx, } for (channel=0; channel<avctx->channels; channel++) { - srcC = src + (big_endian ? bytestream_get_be32(&src) - : bytestream_get_le32(&src)) - + (avctx->channels-channel-1) * 4; + srcC = src + (avctx->channels-channel) * 4; + srcC += (big_endian ? bytestream_get_be32(&src) + : bytestream_get_le32(&src)); samplesC = samples + channel; if (avctx->codec->id == CODEC_ID_ADPCM_EA_R1) { |