diff mplayer.c @ 11352:d8b1f7509df2

Patch by Nico <nsabbi@libero.it> this patch fixes a recently discovered bug for which DVB-C users couldn't tune (wrong parsing of the config file and incorrect parameter passing to tune_it()) and includes the still unapplied patch posted in date 6/9/2003: - it works correctly with and without caches; in the former case it doesn't take anymore a lot of time to empty the cache before changing channel; the uninit_cache() function is called in mplayer.c just after the new tuning operation - initialized a variable identifying the tuner type, and exit if it isn't supported - doesn't crash anymore when 1) the channels file doesn't exists 2) the tuner is used by another application 3) in the menu, when trying to select a channel before the first 4) some mp_msg() called in case of error
author attila
date Sat, 01 Nov 2003 15:17:01 +0000
parents 7edd5436337d
children 85e503ddf65f
line wrap: on
line diff
--- a/mplayer.c	Sat Nov 01 14:57:40 2003 +0000
+++ b/mplayer.c	Sat Nov 01 15:17:01 2003 +0000
@@ -1372,6 +1372,7 @@
 #endif
 
 // CACHE2: initial prefill: 20%  later: 5%  (should be set by -cacheopts)
+goto_enable_cache:
 if(stream_cache_size>0){
   current_module="enable_cache";
   if(!stream_enable_cache(stream,stream_cache_size*1024,stream_cache_size*1024/5,stream_cache_size*1024/20))
@@ -1379,9 +1380,6 @@
 }
 
 //============ Open DEMUXERS --- DETECT file type =======================
-#ifdef HAS_DVBIN_SUPPORT
-goto_open_demuxer:
-#endif
 current_module="demux_open";
 
 demuxer=demux_open(stream,file_format,audio_id,video_id,dvdsub_id,filename);
@@ -1568,7 +1566,8 @@
 		if(dvb_step_channel(priv, dir))
 		{
 	  		uninit_player(INITED_ALL-(INITED_STREAM|INITED_INPUT));
-			goto goto_open_demuxer;
+			cache_uninit(stream);
+			goto goto_enable_cache;
 		}
 	  }
 	}
@@ -2933,8 +2932,8 @@
 		if(dvb_step_channel(priv, dir))
 		{
 	  		uninit_player(INITED_ALL-(INITED_STREAM|INITED_INPUT));
-			printf("UNINIT COMPLETE\n");
-			goto goto_open_demuxer;
+			cache_uninit(stream);
+			goto goto_enable_cache;
 		}
 	  }
 	}
@@ -2967,7 +2966,8 @@
   		if(dvb_set_channel(priv, cmd->args[0].v.i))
 		{
 	  	  uninit_player(INITED_ALL-(INITED_STREAM|INITED_INPUT));
-		  goto goto_open_demuxer;
+		  cache_uninit(stream);
+		  goto goto_enable_cache;
 		}
 	  }
 	}