[Mplayer-cvslog] CVS: main/Gui/mplayer play.c,1.20,1.21 widgets.c,1.4,1.5 widgets.h,1.3,1.4

Zoltan Ponekker pontscho at mplayer.dev.hu
Sat Sep 1 20:39:48 CEST 2001


Update of /cvsroot/mplayer/main/Gui/mplayer
In directory mplayer:/var/tmp.root/cvs-serv9142

Modified Files:
	play.c widgets.c widgets.h 
Log Message:
fix sizeof :))))

Index: play.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/mplayer/play.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- play.c	31 Aug 2001 22:07:53 -0000	1.20
+++ play.c	1 Sep 2001 18:39:46 -0000	1.21
@@ -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
- signal( SIGTYPE,mplMainSigHandler );
-
- memset( mplShMem,0,ShMemSize );
+ mplShMem=calloc( 1,sizeof( mplCommStruct ) );
  mplShMem->Balance=50.0f;
+ signal( SIGTYPE,mplMainSigHandler );
 }
 
 float mplGetPosition( void )

Index: widgets.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/mplayer/widgets.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- widgets.c	29 Aug 2001 13:52:08 -0000	1.4
+++ widgets.c	1 Sep 2001 18:39:46 -0000	1.5
@@ -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 );
 }
 

Index: widgets.h
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/mplayer/widgets.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- widgets.h	26 Aug 2001 19:54:37 -0000	1.3
+++ widgets.h	1 Sep 2001 18:39:46 -0000	1.4
@@ -47,8 +47,6 @@
  gtkOptionsStruct      op;
 } gtkCommStruct;
 
-#define ShMemSize sizeof( gtkCommStruct )
-
 extern gtkCommStruct * gtkShMem;
 
 extern GtkWidget     * SkinBrowser;




More information about the MPlayer-cvslog mailing list