]> git.sesse.net Git - vlc/commitdiff
macosx: do not start same input item twice of startup
authorDavid Fuhrmann <dfuhrmann@videolan.org>
Tue, 30 Sep 2014 15:19:02 +0000 (17:19 +0200)
committerDavid Fuhrmann <dfuhrmann@videolan.org>
Tue, 30 Sep 2014 15:19:02 +0000 (17:19 +0200)
For playlist-autostart, PLAYLIST_PLAY is used now which does not restart
the current item if there is already one running.

This avoids restart of the same item in a quick succession, and thus
workarounds the issue described in refs #11488.

modules/gui/macosx/intf.m

index 12c1496ed3e1fa700573c80a0b8ad03327cab70a..71a9b17fbc869fb4f5002b28861dfae85ed7cd32 100644 (file)
@@ -773,12 +773,14 @@ static VLCMain *_o_sharedMainInstance = nil;
     [o_mainwindow updateTimeSlider];
     [o_mainwindow updateVolumeSlider];
 
+    // respect playlist-autostart
+    // note that PLAYLIST_PLAY will not stop any playback if already started
     playlist_t * p_playlist = pl_Get(VLCIntf);
     PL_LOCK;
     BOOL kidsAround = p_playlist->p_local_category->i_children != 0;
-    PL_UNLOCK;
     if (kidsAround && var_GetBool(p_playlist, "playlist-autostart"))
-        [[self playlist] playItem:nil];
+        playlist_Control(p_playlist, PLAYLIST_PLAY, true);
+    PL_UNLOCK;
 }
 
 /* don't allow a double termination call. If the user has