Mercurial > mplayer.hg
changeset 510:2951d138ddaf
add sub autoread & remove 'c' key
author | pontscho |
---|---|
date | Wed, 18 Apr 2001 20:37:33 +0000 |
parents | 1b2cd175236f |
children | e80c8abd26d1 |
files | mplayer.c |
diffstat | 1 files changed, 8 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/mplayer.c Wed Apr 18 20:25:04 2001 +0000 +++ b/mplayer.c Wed Apr 18 20:37:33 2001 +0000 @@ -496,6 +496,7 @@ char *sub_name=NULL; float sub_delay=0; float sub_fps=0; +int sub_auto = 1; //int user_bpp=0; #include "mixer.h" @@ -586,8 +587,12 @@ subtitles=sub_read_file(sub_name); if(!subtitles) printf("Can't load subtitles: %s\n",font_name); } else { - // try default: - subtitles=sub_read_file(get_path("default.sub")); + if ( sub_auto ) + { + // 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 @@ mixer_decvolume(); break; case 'm': - mixer_usemaster=1; - break;; - case 'c': - mixer_usemaster=0; + mixer_usemaster=!mixer_usemaster; break; } if(rel_seek_secs)