play: Fix prev command.
authorAndre Noll <maan@systemlinux.org>
Sun, 22 Sep 2013 14:45:10 +0000 (16:45 +0200)
committerAndre Noll <maan@systemlinux.org>
Sun, 22 Sep 2013 14:57:12 +0000 (16:57 +0200)
The command handler for com_prev() stores the number of the
previous (valid) file in ->next_file of struct play_task and sets
->rq to CRT_FILE_CHANGE. The real work is supposed to be done in
load_next_file() which is called from the main post_select() function.

However, load_next_file() ignores ->next_file and computes the number
of the next file itself. Hence the "prev" command acts exactly as
"next", i.e. it selects the next rather than the previous file.

Fix this by ignoring ->next_file only if ->rq is CRT_NONE, which
indicates a normal end of file condition.


No differences found