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

ib subversion at mplayerhq.hu
Fri Jan 25 16:54:57 CET 2013


Author: ib
Date: Fri Jan 25 16:54:57 2013
New Revision: 35885

Log:
Fix bug with evPlay.

evPlay must restart the current track when already playing (not the
next one) and continue playing from the current position when paused.

Based on a patch by Hans-Dieter Kosch, hdkosch kabelbw de.

Modified:
   trunk/gui/ui/actions.c

Modified: trunk/gui/ui/actions.c
==============================================================================
--- trunk/gui/ui/actions.c	Fri Jan 25 16:42:36 2013	(r35884)
+++ trunk/gui/ui/actions.c	Fri Jan 25 16:54:57 2013	(r35885)
@@ -178,9 +178,7 @@ void uiEvent(int ev, float param)
     case evPlaySwitchToPause:
 play:
 
-        if ((ev == evPlaySwitchToPause) && (guiInfo.Playing == GUI_PAUSE))
-            goto NoPause;
-
+        if (guiInfo.Playing != GUI_PAUSE) {
         MediumPrepare(guiInfo.StreamType);
 
         switch (guiInfo.StreamType) {
@@ -192,48 +190,44 @@ play:
                 guiInfo.Track = 1;
 
             guiInfo.NewPlay = GUI_FILE_NEW;
+            guiInfo.PlaylistNext = !guiInfo.Playing;
+
             break;
 
         case STREAMTYPE_CDDA:
 
-            if (guiInfo.Playing != GUI_PAUSE) {
                 if (!guiInfo.Track)
                     guiInfo.Track = 1;
 
                 guiInfo.NewPlay = GUI_FILE_SAME;
-            }
 
             break;
 
         case STREAMTYPE_VCD:
 
-            if (guiInfo.Playing != GUI_PAUSE) {
                 if (!guiInfo.Track)
                     guiInfo.Track = 2;
 
                 guiInfo.NewPlay = GUI_FILE_SAME;
-            }
 
             break;
 
         case STREAMTYPE_DVD:
 
-            if (guiInfo.Playing != GUI_PAUSE) {
                 if (!guiInfo.Track)
                     guiInfo.Track = 1;
 
                 guiInfo.NewPlay = GUI_FILE_SAME;
-            }
 
             break;
         }
+        }
 
         uiPlay();
         break;
 
     case evPause:
     case evPauseSwitchToPlay:
-NoPause:
         uiPause();
         break;
 


More information about the MPlayer-cvslog mailing list