[FFmpeg-soc] [soc]: r5504 - aac-sbr/aacsbr.c

alexc subversion at mplayerhq.hu
Mon Dec 7 18:16:36 CET 2009


Author: alexc
Date: Mon Dec  7 18:16:36 2009
New Revision: 5504

Log:
10l: Fix memset undersizing.

Several matrices were memset using sizeof(M) which is sizeof(void*).

Modified:
   aac-sbr/aacsbr.c

Modified: aac-sbr/aacsbr.c
==============================================================================
--- aac-sbr/aacsbr.c	Mon Dec  7 02:27:31 2009	(r5503)
+++ aac-sbr/aacsbr.c	Mon Dec  7 18:16:36 2009	(r5504)
@@ -1211,7 +1211,7 @@ static int sbr_lf_gen(AACContext *ac, Sp
     int k, l;
     const int t_HFGen = 8;
     const int l_f = 32;
-    memset(x_low, 0, sizeof(x_low));
+    memset(x_low, 0, 32*sizeof(*x_low));
     for (k = 0; k < sbr->k[3]; k++) {
         for (l = t_HFGen; l < l_f + t_HFGen; l++) {
             x_low[k][l][0] = W[0][k][l - t_HFGen][0];
@@ -1276,7 +1276,7 @@ static int sbr_x_gen(SpectralBandReplica
     const int t_HFAdj = ENVELOPE_ADJUSTMENT_OFFSET;
     const int l_f = 32;
     const int l_Temp = FFMAX(2*sbr->t_env_num_env_old[ch] - l_f, 0); //FIXME hack to make l_Temp initialize to zero
-    memset(x, 0, sizeof(x));
+    memset(x, 0, 64*sizeof(*x));
     for (k = 0; k < sbr->k[4]; k++) {
         for (l = 0; l < l_Temp; l++) {
             x[k][l][0] = x_low[k][l + t_HFAdj][0];


More information about the FFmpeg-soc mailing list