[FFmpeg-cvslog] r16855 - trunk/libavcodec/adpcm.c

stefang subversion
Fri Jan 30 07:38:47 CET 2009


Author: stefang
Date: Fri Jan 30 07:38:46 2009
New Revision: 16855

Log:
avoid indeterminate order of accessing src

Modified:
   trunk/libavcodec/adpcm.c

Modified: trunk/libavcodec/adpcm.c
==============================================================================
--- trunk/libavcodec/adpcm.c	Fri Jan 30 01:44:54 2009	(r16854)
+++ trunk/libavcodec/adpcm.c	Fri Jan 30 07:38:46 2009	(r16855)
@@ -1300,9 +1300,9 @@ static int adpcm_decode_frame(AVCodecCon
         }
 
         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) {




More information about the ffmpeg-cvslog mailing list