mirror of
https://github.com/mpv-player/mpv
synced 2025-03-25 04:38:01 +00:00
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.
This commit is contained in:
parent
98a31d5937
commit
09a61ba03a
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user