From 94f26b18df137fdc3b7faee6637cd52dd90575c0 Mon Sep 17 00:00:00 2001 From: anders Date: Thu, 3 Oct 2002 12:43:39 +0000 Subject: Fixing the fix buffer overrun should work now git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7591 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libaf/af_channels.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libaf/af_channels.c') diff --git a/libaf/af_channels.c b/libaf/af_channels.c index 042023f49f..fe2a05f231 100644 --- a/libaf/af_channels.c +++ b/libaf/af_channels.c @@ -122,7 +122,7 @@ static af_data_t* play(struct af_instance_s* af, af_data_t* data) // Reset unused channels if nch in < nch out if(af->mul.n > af->mul.d) - memset(l->audio,0,af_lencalc(af->mul, c)); + memset(l->audio,0,(c->len*af->mul.n)/af->mul.d); // Special case always output L & R if(c->nch == 1){ @@ -143,7 +143,7 @@ static af_data_t* play(struct af_instance_s* af, af_data_t* data) // Set output data c->audio = l->audio; - c->len = af_lencalc(af->mul, c); + c->len = (c->len*af->mul.n)/af->mul.d; c->nch = l->nch; return c; -- cgit v1.2.3