[MPlayer-cvslog] r33385 - in trunk/gui/win32: dialogs.h interface.c preferences.c
ib
subversion at mplayerhq.hu
Fri May 6 11:35:47 CEST 2011
Author: ib
Date: Fri May 6 11:35:46 2011
New Revision: 33385
Log:
Fix bug with gfree() definition in Win32 GUI.
gfree (taking pointer of pointer) was erroneously defined
free (taking pointer). Get rid of gfree() by using suitable
free() statements.
Patch by Stephen Sheldon, sfsheldo gmail com.
Modified:
trunk/gui/win32/dialogs.h
trunk/gui/win32/interface.c
trunk/gui/win32/preferences.c
Modified: trunk/gui/win32/dialogs.h
==============================================================================
--- trunk/gui/win32/dialogs.h Fri May 6 10:47:18 2011 (r33384)
+++ trunk/gui/win32/dialogs.h Fri May 6 11:35:46 2011 (r33385)
@@ -34,7 +34,6 @@
#define SOLID_GREY (HBRUSH) CreateSolidBrush(RGB(232, 232, 232))
#define SOLID_GREY2 (HBRUSH) CreateSolidBrush(RGB(175, 175, 175))
-#define gfree free
#define MAXFILE 1024
Modified: trunk/gui/win32/interface.c
==============================================================================
--- trunk/gui/win32/interface.c Fri May 6 10:47:18 2011 (r33384)
+++ trunk/gui/win32/interface.c Fri May 6 11:35:46 2011 (r33385)
@@ -433,8 +433,10 @@ void mplSetFileName(char *dir, char *nam
guiSetDF(guiIntfStruct.Filename, dir, name);
guiIntfStruct.StreamType = type;
- free((void **) &guiIntfStruct.AudioFile);
- free((void **) &guiIntfStruct.Subtitlename);
+ free(guiIntfStruct.AudioFile);
+ guiIntfStruct.AudioFile = NULL;
+ free(guiIntfStruct.Subtitlename);
+ guiIntfStruct.Subtitlename = NULL;
}
void mplFullScreen( void )
Modified: trunk/gui/win32/preferences.c
==============================================================================
--- trunk/gui/win32/preferences.c Fri May 6 10:47:18 2011 (r33384)
+++ trunk/gui/win32/preferences.c Fri May 6 11:35:46 2011 (r33385)
@@ -561,14 +561,14 @@ static LRESULT CALLBACK PrefsWndProc(HWN
if(guiIntfStruct.Playing) guiGetEvent(guiCEvent, (void *)guiSetStop);
/* Set the video driver */
- gfree(video_driver_list[0]);
+ free(video_driver_list[0]);
strl = SendMessage(vo_driver, CB_GETCURSEL, 0, 0);
video_driver_list[0] = malloc(strl);
SendMessage(vo_driver, CB_GETLBTEXT, (WPARAM)strl,
(LPARAM)video_driver_list[0]);
/* Set the audio driver */
- gfree(audio_driver_list[0]);
+ free(audio_driver_list[0]);
strl = SendMessage(ao_driver, CB_GETCURSEL, 0, 0);
audio_driver_list[0] = malloc(strl);
SendMessage(ao_driver, CB_GETLBTEXT, (WPARAM)strl,
More information about the MPlayer-cvslog
mailing list