[Mplayer-cvslog] CVS: main mplayer.c,1.233,1.234
Adam Tla/lka
atlka at mplayer.dev.hu
Thu Aug 23 13:34:01 CEST 2001
Update of /cvsroot/mplayer/main
In directory mplayer:/var/tmp.root/cvs-serv453
Modified Files:
mplayer.c
Log Message:
make automatic subfile detection working with many files
Index: mplayer.c
===================================================================
RCS file: /cvsroot/mplayer/main/mplayer.c,v
retrieving revision 1.233
retrieving revision 1.234
diff -u -r1.233 -r1.234
--- mplayer.c 22 Aug 2001 23:48:18 -0000 1.233
+++ mplayer.c 23 Aug 2001 11:33:58 -0000 1.234
@@ -535,22 +535,6 @@
}
#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);
- } else {
- if(sub_auto && filename) // auto load sub file ...
- subtitles=sub_read_file( sub_filename( get_path("sub/"), filename ) );
- if(!subtitles) subtitles=sub_read_file(get_path("default.sub")); // try default
- }
-#endif
-
#ifdef HAVE_LIRC
#ifdef HAVE_GUI
@@ -587,6 +571,25 @@
curr_filename=0;
play_next_file:
filename=(num_filenames>0)?filenames[curr_filename]:NULL;
+
+#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_auto && filename) { // auto load sub file ...
+ subtitles=sub_read_file( sub_filename( get_path("sub/"), filename ) );
+ }
+ if(!subtitles) subtitles=sub_read_file(get_path("default.sub")); // try default
+ }
+#endif
+
+
demuxer=NULL; stream=NULL;
#ifdef USE_LIBVO2
More information about the MPlayer-cvslog
mailing list