[MPlayer-cvslog] r34145 - trunk/gui/win32/interface.c

ib subversion at mplayerhq.hu
Wed Sep 28 18:17:36 CEST 2011


Author: ib
Date: Wed Sep 28 18:17:35 2011
New Revision: 34145

Log:
Fix Win32 GUI filename problems.

guiInfo.Filename wasn't properly set.
It must be allocated and filename must point to it.

Reported by Stephen Sheldon, sfsheldo gmail com.

Modified:
   trunk/gui/win32/interface.c

Modified: trunk/gui/win32/interface.c
==============================================================================
--- trunk/gui/win32/interface.c	Wed Sep 28 15:53:15 2011	(r34144)
+++ trunk/gui/win32/interface.c	Wed Sep 28 18:17:35 2011	(r34145)
@@ -455,7 +455,7 @@ int gui(int what, void *data)
             dvd_title = 0;
             force_fps = 0;
             if(!mygui->playlist->tracks) return 0;
-            filename = guiInfo.Filename = mygui->playlist->tracks[mygui->playlist->current]->filename;
+            setdup(&guiInfo.Filename, mygui->playlist->tracks[mygui->playlist->current]->filename);
             guiInfo.Track = mygui->playlist->current + 1;
             if(gtkAONorm) greplace(&af_cfg.list, "volnorm", "volnorm");
             if(gtkAOExtraStereo)
@@ -486,10 +486,7 @@ int gui(int what, void *data)
                 }
 #endif
             }
-            if(guiInfo.Filename)
-                filename = strdup(guiInfo.Filename);
-            else if(filename)
-                strcpy(guiInfo.Filename, filename);
+            filename = guiInfo.Filename;
             break;
         }
         case GUI_SET_AUDIO:
@@ -741,6 +738,7 @@ int guiPlaylistInitialize(play_tree_t *m
     {
         mygui->playlist->current = 0;
         filename = mygui->playlist->tracks[0]->filename;
+        uiSetFileName(NULL, filename, STREAMTYPE_FILE);
     }
     return result;
 }


More information about the MPlayer-cvslog mailing list