mirror of
https://github.com/mpv-player/mpv
synced 2025-01-30 11:42:04 +00:00
add sub autoread & remove 'c' key
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@511 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
7eef93819f
commit
6215ef55b8
14
mplayer.c
14
mplayer.c
@ -496,6 +496,7 @@ float font_factor=0.75;
|
|||||||
char *sub_name=NULL;
|
char *sub_name=NULL;
|
||||||
float sub_delay=0;
|
float sub_delay=0;
|
||||||
float sub_fps=0;
|
float sub_fps=0;
|
||||||
|
int sub_auto = 1;
|
||||||
//int user_bpp=0;
|
//int user_bpp=0;
|
||||||
|
|
||||||
#include "mixer.h"
|
#include "mixer.h"
|
||||||
@ -586,8 +587,12 @@ if(!parse_codec_cfg(get_path("codecs.conf"))){
|
|||||||
subtitles=sub_read_file(sub_name);
|
subtitles=sub_read_file(sub_name);
|
||||||
if(!subtitles) printf("Can't load subtitles: %s\n",font_name);
|
if(!subtitles) printf("Can't load subtitles: %s\n",font_name);
|
||||||
} else {
|
} else {
|
||||||
// try default:
|
if ( sub_auto )
|
||||||
subtitles=sub_read_file(get_path("default.sub"));
|
{
|
||||||
|
// auto load sub file ...
|
||||||
|
subtitles=sub_read_file( sub_filename( filename ) );
|
||||||
|
if ( subtitles == NULL ) subtitles=sub_read_file(get_path("default.sub")); // try default:
|
||||||
|
} else subtitles=sub_read_file(get_path("default.sub")); // try default:
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1702,10 +1707,7 @@ switch(sh_video->codec->driver){
|
|||||||
mixer_decvolume();
|
mixer_decvolume();
|
||||||
break;
|
break;
|
||||||
case 'm':
|
case 'm':
|
||||||
mixer_usemaster=1;
|
mixer_usemaster=!mixer_usemaster;
|
||||||
break;;
|
|
||||||
case 'c':
|
|
||||||
mixer_usemaster=0;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if(rel_seek_secs)
|
if(rel_seek_secs)
|
||||||
|
Loading…
Reference in New Issue
Block a user