[MPlayer-cvslog] CVS: main mplayer.c,1.943,1.944

Nico Sabbi CVS syncmail at mplayerhq.hu
Tue Apr 25 22:32:48 CEST 2006


CVS change done by Nico Sabbi CVS

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

Modified Files:
	mplayer.c 
Log Message:
simplified management of dvb channel switching

Index: mplayer.c
===================================================================
RCS file: /cvsroot/mplayer/main/mplayer.c,v
retrieving revision 1.943
retrieving revision 1.944
diff -u -r1.943 -r1.944
--- mplayer.c	24 Apr 2006 21:33:50 -0000	1.943
+++ mplayer.c	25 Apr 2006 20:32:46 -0000	1.944
@@ -118,6 +118,7 @@
 #ifdef HAS_DVBIN_SUPPORT
 #include "libmpdemux/dvbin.h"
 static int last_dvb_step = 1;
+static int dvbin_reopen = 0;
 extern void cache_uninit(stream_t *s);
 #endif
 
@@ -3224,11 +3225,7 @@
 			dir = DVB_CHANNEL_LOWER;
 			
 		if(dvb_step_channel(priv, dir))
-		{
-	  		uninit_player(INITED_ALL-(INITED_STREAM|INITED_INPUT));
-			cache_uninit(stream);
-			goto goto_enable_cache;
-		}
+			eof = dvbin_reopen = 1;
 	  }
 	}
 #endif	
@@ -4451,11 +4448,7 @@
 			
 			
 		if(dvb_step_channel(priv, dir))
-		{
-	  		uninit_player(INITED_ALL-(INITED_STREAM|INITED_INPUT));
-			cache_uninit(stream);
-			goto goto_enable_cache;
-		}
+			eof = dvbin_reopen = 1;
 	  }
 	}
 #endif /* HAS_DVBIN_SUPPORT */
@@ -4484,11 +4477,7 @@
 		    last_dvb_step = -1;
 
   		if(dvb_set_channel(priv, cmd->args[1].v.i, cmd->args[0].v.i))
-		{
-	  	  uninit_player(INITED_ALL-(INITED_STREAM|INITED_INPUT));
-		  cache_uninit(stream);
-		  goto goto_enable_cache;
-		}
+		  eof = dvbin_reopen = 1;
 	  }
 	}
   }
@@ -5084,6 +5073,16 @@
 
 mp_msg(MSGT_GLOBAL,MSGL_V,"EOF code: %d  \n",eof);
 
+#ifdef HAS_DVBIN_SUPPORT
+if(dvbin_reopen)
+{
+  eof = 0;
+  uninit_player(INITED_ALL-(INITED_STREAM|INITED_INPUT));
+  cache_uninit(stream);
+  dvbin_reopen = 0;
+  goto goto_enable_cache;
+}
+#endif
 }
 
 goto_next_file:  // don't jump here after ao/vo/getch initialization!




More information about the MPlayer-cvslog mailing list