[FFmpeg-soc] [soc]: r5133 - als/alsdec.c

thilo.borgmann subversion at mplayerhq.hu
Sat Aug 15 16:34:36 CEST 2009


Author: thilo.borgmann
Date: Sat Aug 15 16:34:36 2009
New Revision: 5133

Log:
Avoid unnecessary multiplication.

Modified:
   als/alsdec.c

Modified: als/alsdec.c
==============================================================================
--- als/alsdec.c	Sat Aug 15 16:28:50 2009	(r5132)
+++ als/alsdec.c	Sat Aug 15 16:34:36 2009	(r5133)
@@ -976,9 +976,9 @@ static av_cold int decode_init(AVCodecCo
     }
 
     // allocate raw and carried samples buffers
-    for (c = 0; c < avctx->channels; c++) {
-        ctx->raw_samples[c] = ctx->raw_buffer + sconf->max_order +
-                              c * channel_size;
+    ctx->raw_samples[0] = ctx->raw_buffer + sconf->max_order;
+    for (c = 1; c < avctx->channels; c++) {
+        ctx->raw_samples[c] = ctx->raw_samples[c - 1] + channel_size;
     }
 
     return 0;


More information about the FFmpeg-soc mailing list