From ac8e40b4ff9318c1d607f7158131e091897d07e7 Mon Sep 17 00:00:00 2001 From: Uoti Urpala Date: Sun, 22 Nov 2009 12:41:04 +0200 Subject: af_scaletempo: Fix delay value after changing scale to 1 The scaletempo filter has a special-case check to return the samples unchanged if the current scaling factor is 1. In this case code setting af->delay wasn't run. If the scale had had a different value and then been changed to 1 as a result of a playback speed change then the delay field could have a nonzero value left, resulting in A/V sync errors. Fix by setting the delay field to 0 in the scale == 1 special case code. --- libaf/af_scaletempo.c | 1 + 1 file changed, 1 insertion(+) (limited to 'libaf') diff --git a/libaf/af_scaletempo.c b/libaf/af_scaletempo.c index a7926712cb..6534a124ec 100644 --- a/libaf/af_scaletempo.c +++ b/libaf/af_scaletempo.c @@ -226,6 +226,7 @@ static af_data_t* play(struct af_instance_s* af, af_data_t* data) int8_t* pout; if (s->scale == 1.0) { + af->delay = 0; return data; } -- cgit v1.2.3