# HG changeset patch # User pontscho # Date 999369586 0 # Node ID 1791c7930776e7be4257aac3376536077f64b249 # Parent 33035a1d897e71ae2c2f43ab3b3a9e562843d995 fix sizeof :)))) diff -r 33035a1d897e -r 1791c7930776 Gui/mplayer/play.c --- a/Gui/mplayer/play.c Sat Sep 01 17:56:31 2001 +0000 +++ b/Gui/mplayer/play.c Sat Sep 01 18:39:46 2001 +0000 @@ -50,6 +50,7 @@ if ( !mplShMem->Playing ) return; mplShMem->Playing=0; mplShMem->TimeSec=0; + mplShMem->Position=0; if ( !appMPlayer.subWindow.isFullScreen ) { wsMoveWindow( &appMPlayer.subWindow,appMPlayer.sub.x,appMPlayer.sub.y ); @@ -96,15 +97,9 @@ void mplMPlayerInit( int argc,char* argv[], char *envp[] ) { -#if 0 - mplShMem=shmem_alloc( ShMemSize ); -#else - mplShMem=calloc( 1,ShMemSize ); -#endif + mplShMem=calloc( 1,sizeof( mplCommStruct ) ); + mplShMem->Balance=50.0f; signal( SIGTYPE,mplMainSigHandler ); - - memset( mplShMem,0,ShMemSize ); - mplShMem->Balance=50.0f; } float mplGetPosition( void ) diff -r 33035a1d897e -r 1791c7930776 Gui/mplayer/widgets.c --- a/Gui/mplayer/widgets.c Sat Sep 01 17:56:31 2001 +0000 +++ b/Gui/mplayer/widgets.c Sat Sep 01 18:39:46 2001 +0000 @@ -85,7 +85,7 @@ void gtkInit( int argc,char* argv[], char *envp[] ) { - gtkShMem=shmem_alloc( ShMemSize ); + gtkShMem=shmem_alloc( sizeof( gtkCommStruct ) ); if ( ( gtkPID = fork() ) == 0 ) gtkThreadProc( argc,argv ); } diff -r 33035a1d897e -r 1791c7930776 Gui/mplayer/widgets.h --- a/Gui/mplayer/widgets.h Sat Sep 01 17:56:31 2001 +0000 +++ b/Gui/mplayer/widgets.h Sat Sep 01 18:39:46 2001 +0000 @@ -47,8 +47,6 @@ gtkOptionsStruct op; } gtkCommStruct; -#define ShMemSize sizeof( gtkCommStruct ) - extern gtkCommStruct * gtkShMem; extern GtkWidget * SkinBrowser;