[MPlayer-cvslog] r34778 - trunk/gui/ui/actions.c

ib subversion at mplayerhq.hu
Mon Feb 27 23:09:34 CET 2012


Author: ib
Date: Mon Feb 27 23:09:34 2012
New Revision: 34778

Log:
Fix bug with playlist playback.

When <stop> is pressed and you shift to another track and press <play>,
the track is played twice (before advancing to the next element in the
list).

Reported by drake ch, drake.ch hotmail com.

When shifting to another track, set information that at the end of
playback of the current track the next track to be played shall not be
determined (!uiGotoTheNext) only if currently playing. That is because
the track shifting function itself (which already has determined the
next track to be played) will end the playback of the current track (and
start the next one) only if currently playing.

If not playing, the next track to be played after the end of playback of
the current track (determined by the track shifting function) must be
determined again (uiGotoTheNext).

Modified:
   trunk/gui/ui/actions.c

Modified: trunk/gui/ui/actions.c
==============================================================================
--- trunk/gui/ui/actions.c	Sat Feb 25 19:26:31 2012	(r34777)
+++ trunk/gui/ui/actions.c	Mon Feb 27 23:09:34 2012	(r34778)
@@ -258,7 +258,7 @@ void uiCurr(void)
 
         if (curr) {
             uiSetFileName(curr->path, curr->name, STREAMTYPE_FILE);
-            uiGotoTheNext = 0;
+            uiGotoTheNext = (guiInfo.Playing ? 0 : 1);
             break;
         }
 
@@ -314,7 +314,7 @@ void uiPrev(void)
 
         if (prev) {
             uiSetFileName(prev->path, prev->name, STREAMTYPE_FILE);
-            uiGotoTheNext = 0;
+            uiGotoTheNext = (guiInfo.Playing ? 0 : 1);
             guiInfo.Track--;
             break;
         }
@@ -375,7 +375,7 @@ void uiNext(void)
 
         if (next) {
             uiSetFileName(next->path, next->name, STREAMTYPE_FILE);
-            uiGotoTheNext = 0;
+            uiGotoTheNext = (guiInfo.Playing ? 0 : 1);
             guiInfo.Track++;
             break;
         }


More information about the MPlayer-cvslog mailing list