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.
This commit is contained in:
Uoti Urpala 2009-11-22 12:41:04 +02:00
parent 74b7dcc5f4
commit ac8e40b4ff
1 changed files with 1 additions and 0 deletions

View File

@ -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;
}