[MPlayer-cvslog] r28846 - trunk/libaf/af_resample.c

reimar subversion at mplayerhq.hu
Fri Mar 6 12:42:46 CET 2009


Author: reimar
Date: Fri Mar  6 12:42:45 2009
New Revision: 28846

Log:
Use calloc to allocate the af_resample ring buffers, reportedly using
non-zeroed buffers can cause initial noise, see -dev-eng:
[PATCH]: Add missing memset after malloc in libaf/af_resample.c
Wed, 4 Mar 2009 15:29:30 +0800

Modified:
   trunk/libaf/af_resample.c

Modified: trunk/libaf/af_resample.c
==============================================================================
--- trunk/libaf/af_resample.c	Fri Mar  6 12:39:13 2009	(r28845)
+++ trunk/libaf/af_resample.c	Fri Mar  6 12:42:45 2009	(r28846)
@@ -216,7 +216,7 @@ static int control(struct af_instance_s*
 
     // Create space for circular buffers
     s->xq = malloc(n->nch*sizeof(void*));
-    s->xq[0] = malloc(n->nch*2*L*af->data->bps);
+    s->xq[0] = calloc(n->nch, 2*L*af->data->bps);
     for(i=1;i<n->nch;i++)
       s->xq[i] = (uint8_t *)s->xq[i-1] + 2*L*af->data->bps;
     s->xi = 0;



More information about the MPlayer-cvslog mailing list