[MPlayer-cvslog] r34152 - in trunk/gui: interface.c ui/actions.c win32/interface.c

ib subversion at mplayerhq.hu
Thu Sep 29 15:26:32 CEST 2011


Author: ib
Date: Thu Sep 29 15:26:32 2011
New Revision: 34152

Log:
Set MPlayer filename in uiSetFileName().

This ensures that filename always points to guiInfo.Filename (the GUI
filename).

If guiInit() is called without filename being set, leave it that way.
(This applies if the GUI should not start playing immediately.)

Modified:
   trunk/gui/interface.c
   trunk/gui/ui/actions.c
   trunk/gui/win32/interface.c

Modified: trunk/gui/interface.c
==============================================================================
--- trunk/gui/interface.c	Thu Sep 29 13:19:23 2011	(r34151)
+++ trunk/gui/interface.c	Thu Sep 29 15:26:32 2011	(r34152)
@@ -233,8 +233,10 @@ void guiInit(void)
 
     uiSubRender = 1;
 
-    if (plCurrent && !filename)
+    if (plCurrent && !filename) {
         uiSetFileName(plCurrent->path, plCurrent->name, STREAMTYPE_FILE);
+        filename = NULL; // don't start playing
+    }
 
     if (subdata)
         setdup(&guiInfo.SubtitleFilename, subdata->filename);

Modified: trunk/gui/ui/actions.c
==============================================================================
--- trunk/gui/ui/actions.c	Thu Sep 29 13:19:23 2011	(r34151)
+++ trunk/gui/ui/actions.c	Thu Sep 29 15:26:32 2011	(r34152)
@@ -229,7 +229,9 @@ void uiSetFileName(char *dir, char *name
     else
         setddup(&guiInfo.Filename, dir, name);
 
+    filename = guiInfo.Filename;
     guiInfo.StreamType = type;
+
     nfree(guiInfo.AudioFilename);
     nfree(guiInfo.SubtitleFilename);
 }

Modified: trunk/gui/win32/interface.c
==============================================================================
--- trunk/gui/win32/interface.c	Thu Sep 29 13:19:23 2011	(r34151)
+++ trunk/gui/win32/interface.c	Thu Sep 29 15:26:32 2011	(r34152)
@@ -340,7 +340,9 @@ void uiSetFileName(char *dir, char *name
     else
         setddup(&guiInfo.Filename, dir, name);
 
+    filename = guiInfo.Filename;
     guiInfo.StreamType = type;
+
     nfree(guiInfo.AudioFilename);
     nfree(guiInfo.SubtitleFilename);
 }


More information about the MPlayer-cvslog mailing list