diff options
author | rcombs <rcombs@rcombs.me> | 2024-04-17 01:13:21 -0700 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2024-04-18 13:11:01 +0200 |
commit | d3a63e16d2a32f4abc39eee8bdbb76baf53dbc35 (patch) | |
tree | 3bcac91c43f1c214529f868ed55e1543b7eb47ee /player/command.c | |
parent | 2f8038c59885d5db875097566e9d8e033f108e0a (diff) | |
download | mpv-d3a63e16d2a32f4abc39eee8bdbb76baf53dbc35.tar.bz2 mpv-d3a63e16d2a32f4abc39eee8bdbb76baf53dbc35.tar.xz |
command: use property_time() for sub-start and sub-end
This gives these properties the "time" type, which allows them to be pretty-printed as HH:MM:SS easily (but also still allows raw formatting using e.g. ${=sub-start}).
Diffstat (limited to 'player/command.c')
-rw-r--r-- | player/command.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/player/command.c b/player/command.c index 4814a897fd..190b1fc025 100644 --- a/player/command.c +++ b/player/command.c @@ -3062,7 +3062,7 @@ static int mp_property_sub_start(void *ctx, struct m_property *prop, double start = get_times(ctx, prop, action, arg).start; if (start == MP_NOPTS_VALUE) return M_PROPERTY_UNAVAILABLE; - return m_property_double_ro(action, arg, start); + return property_time(action, arg, start); } @@ -3072,7 +3072,7 @@ static int mp_property_sub_end(void *ctx, struct m_property *prop, double end = get_times(ctx, prop, action, arg).end; if (end == MP_NOPTS_VALUE) return M_PROPERTY_UNAVAILABLE; - return m_property_double_ro(action, arg, end); + return property_time(action, arg, end); } static int mp_property_playlist_current_pos(void *ctx, struct m_property *prop, |