[Mplayer-cvslog] CVS: main mplayer.c,1.234,1.235

Arpi of Ize arpi at mplayer.dev.hu
Thu Aug 23 13:42:24 CEST 2001


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

Modified Files:
	mplayer.c 
Log Message:
fixed duplicated loading of sub

Index: mplayer.c
===================================================================
RCS file: /cvsroot/mplayer/main/mplayer.c,v
retrieving revision 1.234
retrieving revision 1.235
diff -u -r1.234 -r1.235
--- mplayer.c	23 Aug 2001 11:33:58 -0000	1.234
+++ mplayer.c	23 Aug 2001 11:42:21 -0000	1.235
@@ -535,6 +535,18 @@
   }
 #endif
 
+#ifdef USE_SUB
+// check .sub
+  if(sub_name){
+       int l=strlen(sub_name);
+       if ((l>4) && ((0==strcmp(&sub_name[l-4],".utf"))
+		   ||(0==strcmp(&sub_name[l-4],".UTF"))))
+	  sub_utf8=1;
+       subtitles=sub_read_file(sub_name);
+       if(!subtitles) mp_msg(MSGT_CPLAYER,MSGL_ERR,MSGTR_CantLoadSub,sub_name);
+  }
+#endif
+
 
 #ifdef HAVE_LIRC
  #ifdef HAVE_GUI
@@ -574,14 +586,7 @@
 
 #ifdef USE_SUB
 // check .sub
-  if(sub_name){
-       int l=strlen(sub_name);
-       if ((l>4) && ((0==strcmp(&sub_name[l-4],".utf"))
-		   ||(0==strcmp(&sub_name[l-4],".UTF"))))
-	  sub_utf8=1;
-       subtitles=sub_read_file(sub_name);
-       if(!subtitles) mp_msg(MSGT_CPLAYER,MSGL_ERR,MSGTR_CantLoadSub,sub_name);
-  } else {
+  if(!sub_name){
       if(sub_auto && filename) { // auto load sub file ...
          subtitles=sub_read_file( sub_filename( get_path("sub/"), filename ) );
       }
@@ -589,7 +594,6 @@
   }
 #endif
 
-    
     demuxer=NULL; stream=NULL;
     
 #ifdef USE_LIBVO2




More information about the MPlayer-cvslog mailing list