[MPlayer-cvslog] r33869 - in trunk/gui/win32: gui.c gui.h interface.c
ib
subversion at mplayerhq.hu
Mon Jul 11 12:36:10 CEST 2011
Author: ib
Date: Mon Jul 11 12:36:09 2011
New Revision: 33869
Log:
Fix memory leak in the Win32 GUI.
Use global config variable skinName which has been set
prior to the call of create_gui(), don't pass it.
Modified:
trunk/gui/win32/gui.c
trunk/gui/win32/gui.h
trunk/gui/win32/interface.c
Modified: trunk/gui/win32/gui.c
==============================================================================
--- trunk/gui/win32/gui.c Sun Jul 10 17:45:18 2011 (r33868)
+++ trunk/gui/win32/gui.c Mon Jul 11 12:36:09 2011 (r33869)
@@ -1520,7 +1520,7 @@ int create_window(gui_t *gui, char *skin
return 0;
}
-gui_t *create_gui(char *skindir, char *skinName, void (*playercontrol)(int event))
+gui_t *create_gui(char *skindir, void (*playercontrol)(int event))
{
gui_t *gui = calloc(1, sizeof(gui_t));
char temp[MAX_PATH];
@@ -1540,7 +1540,6 @@ gui_t *create_gui(char *skindir, char *s
/* create playlist */
gui->playlist = create_playlist();
- if(!skinName) skinName = strdup("Blue");
sprintf(temp, "%s\\%s", skindir, skinName);
if(create_window(gui, temp)) return NULL;
if(create_subwindow(gui, temp)) return NULL;
Modified: trunk/gui/win32/gui.h
==============================================================================
--- trunk/gui/win32/gui.h Sun Jul 10 17:45:18 2011 (r33868)
+++ trunk/gui/win32/gui.h Mon Jul 11 12:36:09 2011 (r33869)
@@ -98,7 +98,7 @@ struct gui_t
#define wsMovable 2
#define wsSizeable 4
-gui_t *create_gui(char *skindir, char *skinName, void (*playercontrol)(int event));
+gui_t *create_gui(char *skindir, void (*playercontrol)(int event));
int destroy_window(gui_t *gui);
int create_window(gui_t *gui, char *skindir);
int create_subwindow(gui_t *gui, char *skindir);
Modified: trunk/gui/win32/interface.c
==============================================================================
--- trunk/gui/win32/interface.c Sun Jul 10 17:45:18 2011 (r33868)
+++ trunk/gui/win32/interface.c Mon Jul 11 12:36:09 2011 (r33869)
@@ -377,7 +377,7 @@ static unsigned __stdcall GuiThread(void
MSG msg;
if(!skinName) skinName = strdup("Blue");
- if(!mygui) mygui = create_gui(get_path("skins"), skinName, guiSetEvent);
+ if(!mygui) mygui = create_gui(get_path("skins"), guiSetEvent);
if(!mygui) exit_player(EXIT_ERROR);
if(autosync && autosync != gtkAutoSync)
More information about the MPlayer-cvslog
mailing list