play: Fix next and prev on singular playlists.
authorAndre Noll <maan@tuebingen.mpg.de>
Fri, 5 Sep 2014 23:20:55 +0000 (01:20 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Fri, 5 Sep 2014 23:25:14 +0000 (01:25 +0200)
The next and prev commands do not reset the file position if
the playlist consists of one file only. This fixes it.

play.c

diff --git a/play.c b/play.c
index 01125ab..18bfab9 100644 (file)
--- a/play.c
+++ b/play.c
@@ -860,6 +860,7 @@ static int com_prev(struct play_task *pt, int argc, __a_unused char **argv)
        kill_stream(pt);
        pt->next_file = ret;
        pt->rq = CRT_FILE_CHANGE;
+       pt->start_chunk = 0;
        return 0;
 }
 
@@ -875,6 +876,7 @@ static int com_next(struct play_task *pt, int argc, __a_unused char **argv)
        kill_stream(pt);
        pt->next_file = ret;
        pt->rq = CRT_FILE_CHANGE;
+       pt->start_chunk = 0;
        return 0;
 }