summaryrefslogtreecommitdiffstats
path: root/player/command.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2020-08-12 17:28:08 +0200
committerwm4 <wm4@nowhere>2020-08-12 17:28:25 +0200
commitcda8f1613ff307a9e0b5528743f3e941b05dcee7 (patch)
tree248182c3e4207b11abd11c39488303c76f4e4c32 /player/command.c
parent720bcd79d0304dd82e607efa95d421f402c8a3dd (diff)
downloadmpv-cda8f1613ff307a9e0b5528743f3e941b05dcee7.tar.bz2
mpv-cda8f1613ff307a9e0b5528743f3e941b05dcee7.tar.xz
sd_ass: force full reinit if certain options change at runtime
Options like --sub-ass-force-style and others could not be changed at runtime (the changes didn't take any effect). Fix this by using the brutal approach, and completely reinit the subtitle state when this happens. Maybe a bit clunky, but for now I'd rather not put more effort into this. Fixes: #7689
Diffstat (limited to 'player/command.c')
-rw-r--r--player/command.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/player/command.c b/player/command.c
index aa57dfee8e..de33a14297 100644
--- a/player/command.c
+++ b/player/command.c
@@ -6362,7 +6362,7 @@ void mp_option_change_callback(void *ctx, struct m_config_option *co, int flags,
if (flags & UPDATE_TERM)
mp_update_logging(mpctx, false);
- if (flags & (UPDATE_OSD | UPDATE_SUB_FILT)) {
+ if (flags & (UPDATE_OSD | UPDATE_SUB_FILT | UPDATE_SUB_HARD)) {
for (int n = 0; n < num_ptracks[STREAM_SUB]; n++) {
struct track *track = mpctx->current_track[n][STREAM_SUB];
struct dec_sub *sub = track ? track->d_sub : NULL;
@@ -6372,6 +6372,8 @@ void mp_option_change_callback(void *ctx, struct m_config_option *co, int flags,
}
}
osd_changed(mpctx->osd);
+ if (flags & (UPDATE_SUB_FILT | UPDATE_SUB_HARD))
+ mp_force_video_refresh(mpctx);
mp_wakeup_core(mpctx);
}