From 3bddc16431f8d2e22b03154465e9c62bafd328f3 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 26 Jul 2013 02:06:58 +0200 Subject: options: simplify --correct-pts handling Remove the (now unused) code for determining correct-pts mode based on the demuxer in use. Change its description in the manpage to reflect what this option does now. --- core/mplayer.c | 8 -------- core/options.c | 4 ++-- core/options.h | 1 - 3 files changed, 2 insertions(+), 11 deletions(-) (limited to 'core') diff --git a/core/mplayer.c b/core/mplayer.c index f1f1e81195..3e14abc499 100644 --- a/core/mplayer.c +++ b/core/mplayer.c @@ -4263,14 +4263,6 @@ goto_reopen_demuxer: ; if (mpctx->timeline) timeline_set_part(mpctx, mpctx->timeline_part, true); - // Decide correct-pts mode based on first segment of video track - opts->correct_pts = opts->user_correct_pts; - if (opts->correct_pts < 0) { - int val = 1; - demux_control(mpctx->demuxer, DEMUXER_CTRL_CORRECT_PTS, &val); - opts->correct_pts = val; - } - mpctx->initialized_flags |= INITIALIZED_DEMUXER; add_subtitle_fonts_from_sources(mpctx); diff --git a/core/options.c b/core/options.c index 03acdc570b..dd517dbb22 100644 --- a/core/options.c +++ b/core/options.c @@ -648,7 +648,7 @@ const m_option_t mp_opts[] = { OPT_INTRANGE("chapter-merge-threshold", chapter_merge_threshold, 0, 0, 10000), // a-v sync stuff: - OPT_FLAG("correct-pts", user_correct_pts, 0), + OPT_FLAG("correct-pts", correct_pts, 0), OPT_CHOICE("pts-association-mode", user_pts_assoc_mode, 0, ({"auto", 0}, {"decoder", 1}, {"sort", 2})), OPT_FLAG("initial-audio-sync", initial_audio_sync, 0), @@ -764,7 +764,7 @@ const struct MPOpts mp_default_opts = { .chapterrange = {-1, -1}, .edition_id = -1, .default_max_pts_correction = -1, - .user_correct_pts = -1, + .correct_pts = 1, .initial_audio_sync = 1, .term_osd = 2, .consolecontrols = 1, diff --git a/core/options.h b/core/options.h index fcb8002a42..45f3e858bb 100644 --- a/core/options.h +++ b/core/options.h @@ -94,7 +94,6 @@ typedef struct MPOpts { int chapterrange[2]; int edition_id; int correct_pts; - int user_correct_pts; int user_pts_assoc_mode; int initial_audio_sync; int hr_seek; -- cgit v1.2.3