From ff1568af58598b4b0a2463981fa8da2dce348a79 Mon Sep 17 00:00:00 2001 From: uau Date: Thu, 1 Nov 2007 06:52:41 +0000 Subject: [PATCH] af_scaletempo: Fix audio copy position Because of a missing *num_channels factor the filter copied audio from an incorrect position. This mixed up the channel order and hurt audio quality even if the channels had identical content. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24925 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libaf/af_scaletempo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libaf/af_scaletempo.c b/libaf/af_scaletempo.c index bc2cdba157..b25e8413e8 100644 --- a/libaf/af_scaletempo.c +++ b/libaf/af_scaletempo.c @@ -143,7 +143,7 @@ int _best_overlap_offset_float(af_scaletempo_t* s) { search_start += s->num_channels; } - return best_off * 4; + return best_off * 4 * s->num_channels; } int _best_overlap_offset_s16(af_scaletempo_t* s) { @@ -175,7 +175,7 @@ int _best_overlap_offset_s16(af_scaletempo_t* s) { search_start += s->num_channels; } - return best_off * 2; + return best_off * 2 * s->num_channels; } void _output_overlap_float(af_scaletempo_t* s, int8_t* buf_out, int bytes_off) {