diff options
author | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2009-11-22 12:41:04 +0200 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2009-11-22 12:41:04 +0200 |
commit | ac8e40b4ff9318c1d607f7158131e091897d07e7 (patch) | |
tree | a5efda033b7af7bca82baf23eaf7d2d4a6a65450 /libaf | |
parent | 74b7dcc5f4d9be7293b78fced5ce888bb94c08dc (diff) | |
download | mpv-ac8e40b4ff9318c1d607f7158131e091897d07e7.tar.bz2 mpv-ac8e40b4ff9318c1d607f7158131e091897d07e7.tar.xz |
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.
Diffstat (limited to 'libaf')
-rw-r--r-- | libaf/af_scaletempo.c | 1 |
1 files changed, 1 insertions, 0 deletions
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; } |