commands: playback speed: adjust video timing after change
When changing playback speed, adjust timing state with the goal of
keeping video playback as smooth as possible. This avoids some
undesirable video jumps and pauses that occurred previously, but makes
some audio issues more apparent.
The most obvious audio issue is that if you reduce playback speed
suddenly, then audio will be missing for a while, especially if audio
output buffers are long. Suppose two seconds of audio are in AO
buffers, and you change speed from 8 to 1. The already buffered audio
contains the audio for the next 2 * 8 = 16 seconds in compressed form.
Thus audio will continue playing at high speed for the next 2 seconds,
and then there will be 14 seconds of silence as the audio
corresponding to that part was already consumed. There is no simple
fix for this: nicer behavior would require keeping a copy of the
original normal-speed audio and then after a speed change re-filtering
it and replacing the existing buffers with the result.