From 09a61ba03ab0918d045d02427ccdc775abc38f03 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 13 Jun 2014 02:06:03 +0200 Subject: options: remove use of an inverted option value Now MPOpts.sub_fix_timing corresponds to the commandline switch directly, instead of storing the inverted value. --- options/options.c | 4 ++-- options/options.h | 3 +-- sub/dec_sub.c | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/options/options.c b/options/options.c index dfa5106658..5f2ca9687d 100644 --- a/options/options.c +++ b/options/options.c @@ -302,7 +302,7 @@ const m_option_t mp_opts[] = { OPT_FLAG("sub-visibility", sub_visibility, 0), OPT_FLAG("sub-forced-only", forced_subs_only, 0), OPT_FLAG("stretch-dvd-subs", stretch_dvd_subs, 0), - OPT_FLAG_CONSTANTS("sub-fix-timing", suboverlap_enabled, 0, 1, 0), + OPT_FLAG("sub-fix-timing", sub_fix_timing, 0), OPT_CHOICE("sub-auto", sub_auto, 0, ({"no", -1}, {"exact", 0}, {"fuzzy", 1}, {"all", 2})), OPT_INTRANGE("sub-pos", sub_pos, 0, 0, 100), @@ -617,7 +617,7 @@ const struct MPOpts mp_default_opts = { .ass_style_override = 1, .ass_shaper = 1, .use_embedded_fonts = 1, - .suboverlap_enabled = 0, + .sub_fix_timing = 1, #if HAVE_ENCA .sub_cp = "enca", #else diff --git a/options/options.h b/options/options.h index b93a283b61..801ea36ac2 100644 --- a/options/options.h +++ b/options/options.h @@ -175,8 +175,7 @@ typedef struct MPOpts { char *quvi_format; int quvi_fetch_subtitles; - // subreader.c - int suboverlap_enabled; + int sub_fix_timing; char *sub_cp; char *audio_stream; diff --git a/sub/dec_sub.c b/sub/dec_sub.c index 9fc3997af1..798f6c3000 100644 --- a/sub/dec_sub.c +++ b/sub/dec_sub.c @@ -474,7 +474,7 @@ bool sub_read_all_packets(struct dec_sub *sub, struct sh_stream *sh) if (sub_speed != 1.0) multiply_timings(subs, sub_speed); - if (!opts->suboverlap_enabled) + if (opts->sub_fix_timing) fix_overlaps_and_gaps(subs); if (sh->codec && strcmp(sh->codec, "microdvd") == 0) { -- cgit v1.2.3