[Mplayer-cvslog] CVS: main mplayer.c,1.793,1.794

Reimar Döffinger CVS syncmail at mplayerhq.hu
Sun Oct 10 19:39:11 CEST 2004


CVS change done by Reimar Döffinger CVS

Update of /cvsroot/mplayer/main
In directory mail:/var2/tmp/cvs-serv8731

Modified Files:
	mplayer.c 
Log Message:
Do not loose commands while paused.


Index: mplayer.c
===================================================================
RCS file: /cvsroot/mplayer/main/mplayer.c,v
retrieving revision 1.793
retrieving revision 1.794
diff -u -r1.793 -r1.794
--- mplayer.c	7 Oct 2004 00:14:22 -0000	1.793
+++ mplayer.c	10 Oct 2004 17:39:07 -0000	1.794
@@ -628,7 +628,7 @@
 // The function return a new value for eof.
 static int libmpdemux_was_interrupted(int eof) {
   mp_cmd_t* cmd;
-  if((cmd = mp_input_get_cmd(0,0)) != NULL) {
+  if((cmd = mp_input_get_cmd(0,0,0)) != NULL) {
        switch(cmd->id) {
        case MP_CMD_QUIT:
 	 exit_player_with_rc(MSGTR_Exit_quit, (cmd->nargs > 0)? cmd->args[0].v.i : 0);
@@ -1234,7 +1234,7 @@
 	usec_sleep(20000);
 	guiEventHandling();
 	guiGetEvent( guiReDraw,NULL );
-	if ( (cmd = mp_input_get_cmd(0,0)) != NULL) guiGetEvent( guiIEvent,(char *)cmd->id );
+	if ( (cmd = mp_input_get_cmd(0,0,0)) != NULL) guiGetEvent( guiIEvent,(char *)cmd->id );
        } 
       guiGetEvent( guiSetParameters,NULL );
       if ( guiIntfStruct.StreamType == STREAMTYPE_STREAM )
@@ -2468,7 +2468,7 @@
       if (audio_out && sh_audio)
          audio_out->pause();	// pause audio, keep data if possible
 
-      while( (cmd = mp_input_get_cmd(20,1)) == NULL) {
+      while( (cmd = mp_input_get_cmd(20,1,1)) == NULL) {
 	     if(sh_video && video_out && vo_config_count) video_out->check_events();
 #ifdef HAVE_NEW_GUI
              if(use_gui){
@@ -2483,7 +2483,10 @@
 #endif
              usec_sleep(20000);
          }
+      if (cmd->id == MP_CMD_PAUSE) {
+      cmd = mp_input_get_cmd(0,1,0);
       mp_cmd_free(cmd);
+      }
          osd_function=OSD_PLAY;
       if (audio_out && sh_audio)
         audio_out->resume();	// resume audio
@@ -2548,7 +2551,7 @@
 {
   mp_cmd_t* cmd;
   int brk_cmd = 0;
-  while( !brk_cmd && (cmd = mp_input_get_cmd(0,0)) != NULL) {
+  while( !brk_cmd && (cmd = mp_input_get_cmd(0,0,0)) != NULL) {
     switch(cmd->id) {
     case MP_CMD_SEEK : {
       int v,abs;




More information about the MPlayer-cvslog mailing list