[FFmpeg-soc] [soc]: r2523 - aac/aac.c

superdump subversion at mplayerhq.hu
Sat Jun 21 19:11:05 CEST 2008


Author: superdump
Date: Sat Jun 21 19:11:04 2008
New Revision: 2523

Log:
Add sizeof() to avoid applying memset to less bytes than intended in the case
of a data type change for ms->mask[][]


Modified:
   aac/aac.c

Modified: aac/aac.c
==============================================================================
--- aac/aac.c	(original)
+++ aac/aac.c	Sat Jun 21 19:11:04 2008
@@ -1132,7 +1132,7 @@ static void decode_ms_data(AACContext * 
                 ms->mask[g][i] = get_bits1(gb);// << i;
     } else if (ms->present == 2) {
         for (g = 0; g < cpe->ch[0].ics.num_window_groups; g++)
-            memset(ms->mask[g], 1, cpe->ch[0].ics.max_sfb);
+            memset(ms->mask[g], 1, cpe->ch[0].ics.max_sfb * sizeof(ms->mask[g][0]));
     }
 }
 



More information about the FFmpeg-soc mailing list