# HG changeset patch # User pontscho # Date 1014587836 0 # Node ID 534e7b5aaadb5cf69c2a22f10b2b5b12eb4d54bc # Parent f85d5a17d7824cf7c59180aff5aa1b242997f2e8 mem corruption bug fix. diff -r f85d5a17d782 -r 534e7b5aaadb Gui/interface.h --- a/Gui/interface.h Sun Feb 24 21:27:47 2002 +0000 +++ b/Gui/interface.h Sun Feb 24 21:57:16 2002 +0000 @@ -95,6 +95,7 @@ #define guiXEvent 0 #define guiCEvent 1 +#define guiIEvent 2 extern void guiInit( int argc,char* argv[], char *envp[] ); extern void guiGetEvent( int type,char * arg ); @@ -102,7 +103,7 @@ #define gstrdup( s,ss ) { s=malloc( strlen( ss ) + 3 ); strcpy( s,ss ); } -#define guiSetFilename( s,n ) { s=strdup( n ); } +#define guiSetFilename( s,n ) { if ( s ) free( s ); s=strdup( n ); } #define guiSetDF( s,d,n ) \ { \ diff -r f85d5a17d782 -r 534e7b5aaadb mplayer.c --- a/mplayer.c Sun Feb 24 21:27:47 2002 +0000 +++ b/mplayer.c Sun Feb 24 21:57:16 2002 +0000 @@ -1415,7 +1415,7 @@ guiIntfStruct.MovieWidth=sh_video->disp_w; guiIntfStruct.MovieHeight=sh_video->disp_h; guiIntfStruct.StreamType=stream->type; - guiIntfStruct.Filename=filename; + guiSetFilename( guiIntfStruct.Filename,filename ); } #endif