diff options
author | Uoti Urpala <uau@symbol.nonexistent.invalid> | 2008-05-15 21:19:35 +0300 |
---|---|---|
committer | Uoti Urpala <uau@symbol.nonexistent.invalid> | 2008-05-15 21:19:35 +0300 |
commit | a41db36b22053c2cf103899f3510f68ff5645662 (patch) | |
tree | e2e3d734a828caf8e1fbf1373d818f06c979e53d /mplayer.c | |
parent | 267a3f4c9c00848f32c341595d2d831157a79bee (diff) | |
parent | 84fa3d69f360c87fce4efe6acb128ad78d3647e2 (diff) | |
download | mpv-a41db36b22053c2cf103899f3510f68ff5645662.tar.bz2 mpv-a41db36b22053c2cf103899f3510f68ff5645662.tar.xz |
Merge svn changes up to r26783
Conflicts:
Makefile
common.mak
configure
libmpcodecs/vd_ffmpeg.c
libmpdemux/demux_mkv.c
libvo/vo_xv.c
mplayer.c
Diffstat (limited to 'mplayer.c')
-rw-r--r-- | mplayer.c | 27 |
1 files changed, 15 insertions, 12 deletions
@@ -651,6 +651,9 @@ void exit_player_with_rc(struct MPContext *mpctx, const char* how, int rc){ if (mpctx->user_muted && !mpctx->edl_muted) mixer_mute(&mpctx->mixer); uninit_player(mpctx, INITIALIZED_ALL); +#ifdef WIN32 + timeEndPeriod(1); +#endif #ifdef HAVE_X11 #ifdef HAVE_NEW_GUI if ( !use_gui ) @@ -2648,6 +2651,8 @@ int gui_no_filename=0; #endif #ifdef WIN32 + // request 1ms timer resolution + timeBeginPeriod(1); if(proc_priority){ int i; for(i=0; priority_presets_defs[i].name; i++){ @@ -3487,10 +3492,7 @@ if(mpctx->sh_video) { if (mpctx->global_sub_size) { // find the best sub to use int vobsub_index_id = vobsub_get_index_by_id(vo_vobsub, vobsub_id); - if (opts->sub_id < 0 && dvdsub_lang) - opts->sub_id = demuxer_sub_track_by_lang(mpctx->demuxer, dvdsub_lang); - if (opts->sub_id < 0) - opts->sub_id = demuxer_default_sub_track(mpctx->demuxer); + mpctx->global_sub_pos = -1; // no subs by default if (vobsub_index_id >= 0) { // if user asks for a vobsub id, use that first. mpctx->global_sub_pos = mpctx->global_sub_indices[SUB_SOURCE_VOBSUB] + vobsub_index_id; @@ -3500,14 +3502,14 @@ if (mpctx->global_sub_size) { } else if (mpctx->global_sub_indices[SUB_SOURCE_SUBS] >= 0) { // if there are text subs to use, use those. (autosubs come last here) mpctx->global_sub_pos = mpctx->global_sub_indices[SUB_SOURCE_SUBS]; -/* - } else if (mpctx->global_sub_indices[SUB_SOURCE_DEMUX] >= 0) { - // if nothing else works, get subs from the demuxer. - mpctx->global_sub_pos = mpctx->global_sub_indices[SUB_SOURCE_DEMUX]; -*/ - } else { - // nothing worth doing automatically. - mpctx->global_sub_pos = -1; + } else if (opts->sub_id < 0 && mpctx->global_sub_indices[SUB_SOURCE_DEMUX] >= 0) { + // finally select subs by language and container hints + if (opts->sub_id < 0 && dvdsub_lang) + opts->sub_id = demuxer_sub_track_by_lang(mpctx->demuxer, dvdsub_lang); + if (opts->sub_id < 0) + opts->sub_id = demuxer_default_sub_track(mpctx->demuxer); + if (opts->sub_id >= 0) + mpctx->global_sub_pos = mpctx->global_sub_indices[SUB_SOURCE_DEMUX] + opts->sub_id; } // rather than duplicate code, use the SUB_SELECT handler to init the right one. mpctx->global_sub_pos--; @@ -3655,6 +3657,7 @@ if ( use_gui ) { mp_input_set_section(mpctx->input, NULL); //TODO: add desired (stream-based) sections here if (mpctx->stream->type==STREAMTYPE_TV) mp_input_set_section(mpctx->input, "tv"); + if (mpctx->stream->type==STREAMTYPE_DVDNAV) mp_input_set_section(mpctx->input, "dvdnav"); //==================== START PLAYING ======================= |