# HG changeset patch # User reimar # Date 1236339765 0 # Node ID 7c0b23a811bd99cee7156a5d527d460534622fc4 # Parent 54230bed6a344f7aacada551b73b02d8283d5867 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 diff -r 54230bed6a34 -r 7c0b23a811bd libaf/af_resample.c --- a/libaf/af_resample.c Fri Mar 06 11:39:13 2009 +0000 +++ b/libaf/af_resample.c Fri Mar 06 11:42:45 2009 +0000 @@ -216,7 +216,7 @@ // 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;