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.)
This commit is contained in:
wm4 2015-03-06 21:48:41 +01:00
parent f0ab1f2048
commit c30d5f79b5
1 changed files with 9 additions and 3 deletions

View File

@ -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: