From 37a09a25fff31bb8fd860577430272567ba03cca Mon Sep 17 00:00:00 2001 From: reimar Date: Fri, 6 Mar 2009 11:42:45 +0000 Subject: 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 git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28846 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libaf/af_resample.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libaf/af_resample.c b/libaf/af_resample.c index 3698806fd5..721a19b4a4 100644 --- a/libaf/af_resample.c +++ b/libaf/af_resample.c @@ -216,7 +216,7 @@ static int control(struct af_instance_s* af, int cmd, void* arg) // 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;inch;i++) s->xq[i] = (uint8_t *)s->xq[i-1] + 2*L*af->data->bps; s->xi = 0; -- cgit v1.2.3