diff options
author | pontscho <pontscho@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-12-15 15:36:07 +0000 |
---|---|---|
committer | pontscho <pontscho@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-12-15 15:36:07 +0000 |
commit | f0446a09ad3e40d1d90071f094acd910f49da3c5 (patch) | |
tree | a7ef270aa9fe840b067b7e1fda9d26776c6e00db /mplayer.c | |
parent | c1099888adaf0548fe3b0de86a700576416413b1 (diff) | |
download | mpv-f0446a09ad3e40d1d90071f094acd910f49da3c5.tar.bz2 mpv-f0446a09ad3e40d1d90071f094acd910f49da3c5.tar.xz |
Add subtitle loader for gui
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@3500 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'mplayer.c')
-rw-r--r-- | mplayer.c | 24 |
1 files changed, 12 insertions, 12 deletions
@@ -589,18 +589,6 @@ if(!parse_codec_cfg(get_path("codecs.conf"))){ } #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 || sub_num == 0) mp_msg(MSGT_CPLAYER,MSGL_ERR,MSGTR_CantLoadSub,sub_name); - } -#endif - // It's time to init the GUI code: (and fork() the GTK process) #ifdef HAVE_NEW_GUI if(use_gui){ @@ -678,6 +666,10 @@ play_next_file: if(mplShMem->FilenameChanged){ filename=mplShMem->Filename; } +#ifdef USE_SUB + sub_name=NULL; + if ( mplShMem->SubtitleChanged ) sub_name=mplShMem->Subtitlename; +#endif } #endif @@ -685,6 +677,14 @@ play_next_file: #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 || sub_num == 0) mp_msg(MSGT_CPLAYER,MSGL_ERR,MSGTR_CantLoadSub,sub_name); + } if(!sub_name){ if(sub_auto && filename) { // auto load sub file ... subtitles=sub_read_file( sub_filename( get_path("sub/"), filename ) ); |