Mercurial > mplayer.hg
changeset 33298:f0733d37f56b
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.
author | ib |
---|---|
date | Fri, 06 May 2011 09:35:46 +0000 |
parents | 9a7b0dab3d95 |
children | 4de57122abd7 |
files | gui/win32/dialogs.h gui/win32/interface.c gui/win32/preferences.c |
diffstat | 3 files changed, 6 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/gui/win32/dialogs.h Fri May 06 08:47:18 2011 +0000 +++ b/gui/win32/dialogs.h Fri May 06 09:35:46 2011 +0000 @@ -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
--- a/gui/win32/interface.c Fri May 06 08:47:18 2011 +0000 +++ b/gui/win32/interface.c Fri May 06 09:35:46 2011 +0000 @@ -433,8 +433,10 @@ 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 )
--- a/gui/win32/preferences.c Fri May 06 08:47:18 2011 +0000 +++ b/gui/win32/preferences.c Fri May 06 09:35:46 2011 +0000 @@ -561,14 +561,14 @@ 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,