diff options
author | Dudemanguy <random342@airmail.cc> | 2023-09-06 21:35:22 -0500 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2023-09-07 09:27:31 -0500 |
commit | b47a58516af2c36e66c3987748b5b4a1275ed9e7 (patch) | |
tree | 89c42b1c7bfe48834482df28bc395aafdbefca70 /options | |
parent | a7185fbb605573b25d74aacb4f3802993bb89a93 (diff) | |
download | mpv-b47a58516af2c36e66c3987748b5b4a1275ed9e7.tar.bz2 mpv-b47a58516af2c36e66c3987748b5b4a1275ed9e7.tar.xz |
sub: add auto option to --sub-fix-timing
Third try is the charm? I stupidly missed that this option already
existed in my previous commits. Instead, add an auto value to it and
enable it by default for sd_lavc but not sd_ass. On my limited samples,
it seems to fix the gaps issue that can occur but without regressing
some duration timings for sub_lavc subtitles. Well hopefully anyway.
Fixes #12327.
Diffstat (limited to 'options')
-rw-r--r-- | options/options.c | 4 | ||||
-rw-r--r-- | options/options.h | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/options/options.c b/options/options.c index c3977136b4..35b89beaa5 100644 --- a/options/options.c +++ b/options/options.c @@ -267,7 +267,8 @@ const struct m_sub_options mp_subtitle_sub_opts = { {"stretch-dvd-subs", OPT_BOOL(stretch_dvd_subs)}, {"stretch-image-subs-to-screen", OPT_BOOL(stretch_image_subs)}, {"image-subs-video-resolution", OPT_BOOL(image_subs_video_res)}, - {"sub-fix-timing", OPT_BOOL(sub_fix_timing)}, + {"sub-fix-timing", OPT_CHOICE(sub_fix_timing, + {"auto", -1}, {"no", 0}, {"yes", 1})}, {"sub-pos", OPT_FLOAT(sub_pos), M_RANGE(0.0, 150.0)}, {"sub-gauss", OPT_FLOAT(sub_gauss), M_RANGE(0.0, 3.0)}, {"sub-gray", OPT_BOOL(sub_gray)}, @@ -306,6 +307,7 @@ const struct m_sub_options mp_subtitle_sub_opts = { .defaults = &(OPT_BASE_STRUCT){ .sub_visibility = true, .sec_sub_visibility = true, + .sub_fix_timing = -1, .sub_pos = 100, .sub_speed = 1.0, .ass_enabled = true, diff --git a/options/options.h b/options/options.h index 3250729b48..8c8ff28490 100644 --- a/options/options.h +++ b/options/options.h @@ -89,7 +89,7 @@ struct mp_subtitle_opts { bool stretch_dvd_subs; bool stretch_image_subs; bool image_subs_video_res; - bool sub_fix_timing; + int sub_fix_timing; bool sub_scale_by_window; bool sub_scale_with_window; bool ass_scale_with_window; |