[vlc-commits] macosx: do not start same input item twice of startup

David Fuhrmann git at videolan.org
Tue Sep 30 17:23:38 CEST 2014


vlc/vlc-2.2 | branch: master | David Fuhrmann <dfuhrmann at videolan.org> | Tue Sep 30 17:19:02 2014 +0200| [91fe611c988d91720d8ed0812643d049ea0254a0] | committer: David Fuhrmann

macosx: do not start same input item twice of startup

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.

(cherry picked from commit e6dfd01f3dc2ff7b34006d214e57524f82e5ccd6)
Signed-off-by: David Fuhrmann <dfuhrmann at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=91fe611c988d91720d8ed0812643d049ea0254a0
---

 modules/gui/macosx/intf.m |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m
index 51d438d..292011a 100644
--- a/modules/gui/macosx/intf.m
+++ b/modules/gui/macosx/intf.m
@@ -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



More information about the vlc-commits mailing list