[MPlayer-cvslog] CVS: main mencoder.c,1.261,1.262

Reynaldo H. Verdejo CVS syncmail at mplayerhq.hu
Sat Feb 12 16:11:04 CET 2005


CVS change done by Reynaldo H. Verdejo CVS

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

Modified Files:
	mencoder.c 
Log Message:
small reordering to make future 'multiple files' changes more modular, puts single file loading separate from global option loading in the begginning. patch by Oded Shimon

Index: mencoder.c
===================================================================
RCS file: /cvsroot/mplayer/main/mencoder.c,v
retrieving revision 1.261
retrieving revision 1.262
diff -u -r1.261 -r1.262
--- mencoder.c	29 Jan 2005 21:26:20 -0000	1.261
+++ mencoder.c	12 Feb 2005 15:11:02 -0000	1.262
@@ -454,13 +454,6 @@
  parse_cfgfiles(mconfig);
  filelist = m_config_parse_me_command_line(mconfig, argc, argv);
  if(!filelist) mencoder_exit(1, MSGTR_ErrorParsingCommandLine);
- m_entry_set_options(mconfig,&filelist[0]);
- filename = filelist[0].name;
-
-  if(!filename){
-	mp_msg(MSGT_FIXME, MSGL_FIXME, MSGTR_MissingFilename);
-	mencoder_exit(1,NULL);
-  }
 
   mp_msg_set_level(verbose+MSGL_STATUS);
 
@@ -489,6 +482,13 @@
 
   vo_init_osd();
 
+  m_entry_set_options(mconfig,&filelist[0]);
+  filename = filelist[0].name;
+ 
+  if(!filename){
+	mp_msg(MSGT_CPLAYER, MSGL_FATAL, MSGTR_MissingFilename);
+	mencoder_exit(1,NULL);
+  }
   stream=open_stream(filename,0,&file_format);
 
   if(!stream){
@@ -571,6 +571,21 @@
   mp_msg(MSGT_CPLAYER,MSGL_INFO,"==========================================================================\n");
 }
 
+#ifdef USE_SUB
+// after reading video params we should load subtitles because
+// we know fps so now we can adjust subtitles time to ~6 seconds AST
+// check .sub
+//  current_module="read_subtitles_file";
+  if(sub_name && sub_name[0]){
+    subdata=sub_read_file(sub_name[0], sh_video->fps);
+    if(!subdata) mp_msg(MSGT_CPLAYER,MSGL_ERR,MSGTR_CantLoadSub,sub_name[0]);
+  } else
+  if(sub_auto) { // auto load sub file ...
+    subdata=sub_read_file( filename ? sub_filenames( get_path("sub/"), filename )[0]
+	                              : "default.sub", sh_video->fps );
+  }
+#endif	
+
 // set up video encoder:
 
 if (vobsub_out) {
@@ -613,21 +628,6 @@
 #endif
 }
 
-#ifdef USE_SUB
-// after reading video params we should load subtitles because
-// we know fps so now we can adjust subtitles time to ~6 seconds AST
-// check .sub
-//  current_module="read_subtitles_file";
-  if(sub_name && sub_name[0]){
-    subdata=sub_read_file(sub_name[0], sh_video->fps);
-    if(!subdata) mp_msg(MSGT_CPLAYER,MSGL_ERR,MSGTR_CantLoadSub,sub_name[0]);
-  } else
-  if(sub_auto) { // auto load sub file ...
-    subdata=sub_read_file( filename ? sub_filenames( get_path("sub/"), filename )[0]
-	                              : "default.sub", sh_video->fps );
-  }
-#endif	
-
 // Apply current settings for forced subs
 spudec_set_forced_subs_only(vo_spudec,forced_subs_only);
 




More information about the MPlayer-cvslog mailing list