[Mplayer-cvslog] CVS: main mplayer.c,1.735,1.736

Attila Kinali CVS attila at mplayerhq.hu
Sat Nov 1 16:17:23 CET 2003


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

Modified Files:
	mplayer.c 
Log Message:
Patch by Nico <nsabbi at 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



Index: mplayer.c
===================================================================
RCS file: /cvsroot/mplayer/main/mplayer.c,v
retrieving revision 1.735
retrieving revision 1.736
diff -u -r1.735 -r1.736
--- mplayer.c	30 Oct 2003 15:02:16 -0000	1.735
+++ mplayer.c	1 Nov 2003 15:16:19 -0000	1.736
@@ -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;
 		}
 	  }
 	}



More information about the MPlayer-cvslog mailing list