[Mplayer-cvslog] CVS: main mplayer.c,1.379,1.380

Alban Bedel CVS albeu at mplayer.dev.hu
Thu Jan 31 10:37:14 CET 2002


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

Modified Files:
	mplayer.c 
Log Message:
Added uninit to input


Index: mplayer.c
===================================================================
RCS file: /cvsroot/mplayer/main/mplayer.c,v
retrieving revision 1.379
retrieving revision 1.380
diff -u -r1.379 -r1.380
--- mplayer.c	30 Jan 2002 12:46:03 -0000	1.379
+++ mplayer.c	31 Jan 2002 09:37:11 -0000	1.380
@@ -292,6 +292,7 @@
 #define INITED_LIRC 16
 #define INITED_SPUDEC 32
 #define INITED_STREAM 64
+#define INITED_INPUT    128
 #define INITED_ALL 0xFFFF
 
 void uninit_player(unsigned int mask){
@@ -349,6 +350,14 @@
   }
 #endif
 
+#ifdef HAVE_NEW_INPUT
+  if(mask&INITED_INPUT){
+    inited_flags&=INITED_INPUT;
+    current_module="uninit_input";
+    mp_input_uninit();
+  }
+#endif
+
   current_module=NULL;
 
 }
@@ -634,7 +643,7 @@
   }
 #endif
 
-#ifdef HAVE_LIRC
+#if defined(HAVE_LIRC) && ! defined(HAVE_NEW_INPUT)
   lirc_mp_setup();
   inited_flags|=INITED_LIRC;
 #endif
@@ -684,6 +693,7 @@
    mp_input_add_cmd_fd(0,1,NULL,NULL);
 else
   mp_input_add_key_fd(0,1,NULL,NULL);
+inited_flags|=INITED_INPUT;
 current_module = NULL;
 #endif
 
@@ -868,7 +878,7 @@
   current_module="open_stream";
   stream=open_stream(filename,vcd_track,&file_format);
   if(!stream) { // error...
-    uninit_player(inited_flags-(INITED_GUI+INITED_LIRC));
+    uninit_player(inited_flags-(INITED_GUI+INITED_LIRC+INITED_INPUT));
     goto goto_next_file_src;
   }
   inited_flags|=INITED_STREAM;
@@ -886,7 +896,7 @@
 	  goto goto_next_file;
       }
       play_tree_remove(entry,1,1);
-      uninit_player(inited_flags-(INITED_GUI+INITED_LIRC));
+      uninit_player(inited_flags-(INITED_GUI+INITED_LIRC+INITED_INPUT));
       goto goto_next_file_src;
     }
     play_tree_insert_entry(playtree_iter->tree,entry);
@@ -894,7 +904,7 @@
     if(play_tree_iter_step(playtree_iter,1,0) != PLAY_TREE_ITER_ENTRY)
       goto goto_next_file;
     play_tree_remove(entry,1,1);
-    uninit_player(inited_flags-(INITED_GUI+INITED_LIRC));
+    uninit_player(inited_flags-(INITED_GUI+INITED_LIRC+INITED_INPUT));
     goto goto_next_file_src;
   }
   stream->start_pos+=seek_to_byte;
@@ -2697,7 +2707,7 @@
 if(eof == PT_NEXT_ENTRY || eof == PT_PREV_ENTRY) {
   eof = eof == PT_NEXT_ENTRY ? 1 : -1;
   if(play_tree_iter_step(playtree_iter,eof,0) == PLAY_TREE_ITER_ENTRY) {
-    uninit_player(INITED_ALL-(INITED_GUI+INITED_LIRC));
+    uninit_player(INITED_ALL-(INITED_GUI+INITED_LIRC+INITED_INPUT));
     eof = 1;
   } else {
     play_tree_iter_free(playtree_iter);
@@ -2706,14 +2716,14 @@
 } else if (eof == PT_UP_NEXT || eof == PT_UP_PREV) {
   eof = eof == PT_UP_NEXT ? 1 : -1;
   if(play_tree_iter_up_step(playtree_iter,eof,0) == PLAY_TREE_ITER_ENTRY) {
-    uninit_player(INITED_ALL-(INITED_GUI+INITED_LIRC));
+    uninit_player(INITED_ALL-(INITED_GUI+INITED_LIRC+INITED_INPUT));
     eof = 1;
   } else {
     play_tree_iter_free(playtree_iter);
     playtree_iter = NULL;
   }
 }else { // NEXT PREV SRC
-     uninit_player(INITED_ALL-(INITED_GUI+INITED_LIRC));
+     uninit_player(INITED_ALL-(INITED_GUI+INITED_LIRC+INITED_INPUT));
      eof = eof == PT_PREV_SRC ? -1 : 1;
 }
 




More information about the MPlayer-cvslog mailing list