changeset 34113:b3e209516ae0

Allow GUI to use filename related config. The GUI provides MPlayer with the respective (next) filename to play and playtree_iter is always NULL in connection with the GUI. MPlayer must not clear the filename then, or else filename related config like load_per_protocol_config(), load_per_extension_config() or load_per_file_config() won't work. The GUI sets filename NULL now if there is no further file to play.
author ib
date Sat, 15 Oct 2011 10:37:36 +0000
parents 6af39671370d
children 113156bc1137
files gui/interface.c mplayer.c
diffstat 2 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/gui/interface.c	Sat Oct 15 06:41:24 2011 +0000
+++ b/gui/interface.c	Sat Oct 15 10:37:36 2011 +0000
@@ -774,6 +774,8 @@
             if (guiInfo.NewPlay == GUI_FILE_NEW)
                 break;
 
+            filename = NULL;
+
             guiInfo.ElapsedTime   = 0;
             guiInfo.Position      = 0;
             guiInfo.AudioChannels = 0;
--- a/mplayer.c	Sat Oct 15 06:41:24 2011 +0000
+++ b/mplayer.c	Sat Oct 15 10:37:36 2011 +0000
@@ -4040,7 +4040,7 @@
         (use_gui && guiInfo.Playing) ||
 #endif
                                         mpctx->playtree_iter != NULL || player_idle_mode) {
-        if (!mpctx->playtree_iter)
+        if (!mpctx->playtree_iter && !use_gui)
             filename = NULL;
         mpctx->eof = 0;
         goto play_next_file;