commands: finish seeks before processing other commands
commit0b6e3647a504ffd385c424d37575a971eabcb801
authorUoti Urpala <uau@glyph.nonexistent.invalid>
Sun, 25 Apr 2010 19:05:59 +0000 (25 22:05 +0300)
committerUoti Urpala <uau@glyph.nonexistent.invalid>
Sun, 25 Apr 2010 19:48:40 +0000 (25 22:48 +0300)
tree84b94f564e64061d4485d24fe5f8dcb1f056e263
parent4cb23ad350f566460d96bf24fcc1949d57a0701f
commands: finish seeks before processing other commands

The code processing seek commands only sets/alters variables
specifying the current seek target. Before all queued commands were
processed first, and any needed seeks were executed after that. This
was somewhat unreliable, as commands queued later were not guaranteed
to see all the effects of earlier seek commands if they happened to be
processed in the same batch. Change the behavior so that processing
commands is interrupted and the real seek executed if the next command
is anything other than a basic seek. This guarantees that other
commands see a consistent state, while still allowing the combining of
consecutive seeks (which is useful for example when the user keeps the
seek-forward key pressed down, and key repeat is faster than seeks can
be executed).
mplayer.c