summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-03-06 21:48:41 +0100
committerwm4 <wm4@nowhere>2015-03-06 21:48:41 +0100
commitc30d5f79b5a94adc9796a9751b0cab2b6c3b9e3d (patch)
treea80f83fcf8ff215e0e04a4e66477da361cac47b6
parentf0ab1f2048d6d04744957d75623ca5bd04fc23fa (diff)
downloadmpv-c30d5f79b5a94adc9796a9751b0cab2b6c3b9e3d.tar.bz2
mpv-c30d5f79b5a94adc9796a9751b0cab2b6c3b9e3d.tar.xz
af_scaletempo: restore confusing mplayer behavior
This matters only when setting obscure scaletempo suboptions. See #1653. (But what we really should do is figuring out how to do this in a sane way.)
-rw-r--r--audio/filter/af_scaletempo.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/audio/filter/af_scaletempo.c b/audio/filter/af_scaletempo.c
index 707060578f..8702819372 100644
--- a/audio/filter/af_scaletempo.c
+++ b/audio/filter/af_scaletempo.c
@@ -433,9 +433,15 @@ static int control(struct af_instance *af, int cmd, void *arg)
return af_test_output(af, (struct mp_audio *)arg);
}
case AF_CONTROL_SET_PLAYBACK_SPEED: {
- if (s->speed_tempo == s->speed_pitch)
- break; // doesn't change speed
- update_speed(af, *(double *)arg);
+ double speed = *(double *)arg;
+ if (s->speed_tempo) {
+ if (s->speed_pitch)
+ break;
+ update_speed(af, speed);
+ } else if (s->speed_pitch) {
+ update_speed(af, speed);
+ break; // do not signal OK
+ }
return AF_OK;
}
case AF_CONTROL_RESET: