diff options
author | rcombs <rcombs@rcombs.me> | 2024-04-17 13:00:07 -0700 |
---|---|---|
committer | Kacper Michajłow <kasper93@gmail.com> | 2024-04-27 01:19:56 +0200 |
commit | 437fff9f2169f677045a5263e0cdf1586871f047 (patch) | |
tree | b8af693b963c89f99310560cbc9c625bb2a0ade2 /player/command.c | |
parent | aa0a9ce2ec15af780eb8f02636aad4cf4e357d0c (diff) | |
download | mpv-437fff9f2169f677045a5263e0cdf1586871f047.tar.bz2 mpv-437fff9f2169f677045a5263e0cdf1586871f047.tar.xz |
player/command: move sub-text-ass to a sub-property
Diffstat (limited to 'player/command.c')
-rw-r--r-- | player/command.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/player/command.c b/player/command.c index b7130814d8..39cb9d8720 100644 --- a/player/command.c +++ b/player/command.c @@ -3021,6 +3021,18 @@ static int mp_property_sub_text(void *ctx, struct m_property *prop, int sub_index = def[0]; int type = def[1]; + if (action == M_PROPERTY_KEY_ACTION) { + struct m_property_action_arg *ka = arg; + + if (!strcmp(ka->key, "ass")) + type = SD_TEXT_TYPE_ASS; + else + return M_PROPERTY_UNKNOWN; + + action = ka->action; + arg = ka->arg; + } + struct track *track = mpctx->current_track[sub_index][STREAM_SUB]; struct dec_sub *sub = track ? track->d_sub : NULL; double pts = mpctx->playback_pts; |