mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-28 05:33:14 +00:00
player: make sub-pos a float value
mpv makes this option an integer, but the underlying ass API actually accepts doubles. From some testing, there is no meaningful precision difference between float or double (it seems to go in roughly 0.05 steps), so just make it a float. sd_lavc also can handle non-integer values here. Closes #11583.
This commit is contained in:
@@ -267,7 +267,7 @@ const struct m_sub_options mp_subtitle_sub_opts = {
|
||||
{"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-pos", OPT_INT(sub_pos), M_RANGE(0, 150)},
|
||||
{"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)},
|
||||
{"sub-ass", OPT_BOOL(ass_enabled), .flags = UPDATE_SUB_HARD},
|
||||
|
||||
@@ -78,7 +78,7 @@ typedef struct mp_vo_opts {
|
||||
struct mp_subtitle_opts {
|
||||
bool sub_visibility;
|
||||
bool sec_sub_visibility;
|
||||
int sub_pos;
|
||||
float sub_pos;
|
||||
float sub_delay;
|
||||
float sub_fps;
|
||||
float sub_speed;
|
||||
|
||||
Reference in New Issue
Block a user