diff options
author | Niklas Haas <git@haasn.dev> | 2022-02-15 12:47:53 +0100 |
---|---|---|
committer | Niklas Haas <github-daiK1o@haasn.dev> | 2022-02-21 12:01:44 +0100 |
commit | fbe154831a8addfc18a4f81e1c4b9284c31acace (patch) | |
tree | 1aca46bd7926589269894ec0216b53f4807a4936 /player | |
parent | 27c38eac1040cd781f39d977ce53adcd65ddcfb6 (diff) | |
download | mpv-fbe154831a8addfc18a4f81e1c4b9284c31acace.tar.bz2 mpv-fbe154831a8addfc18a4f81e1c4b9284c31acace.tar.xz |
vo_gpu_next: refactor subtitle rendering
Render subs at the output resolution, rather than the video resolution.
Uses the new APIs found in libplacebo 197+, to allow controlling the OSD
resolution even for image-attached overlays.
Also fixes an issue where the overlay state did not get correctly
updated while paused. To avoid regenerating the OSD / flushing the cache
constantly, we keep track of OSD changes and only regenerate the OSD
when the OSD state is expected to change in some way (e.g. resolution
change). This requires introducing a new VOCTRL to inform the VO when
the UPDATE_OSD-tagged options have changed.
Fixes #9744, #9524, #9399 and #9398.
Diffstat (limited to 'player')
-rw-r--r-- | player/command.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/player/command.c b/player/command.c index 4f2eb4741d..2b4650e062 100644 --- a/player/command.c +++ b/player/command.c @@ -6619,6 +6619,8 @@ void mp_option_change_callback(void *ctx, struct m_config_option *co, int flags, } } osd_changed(mpctx->osd); + if (mpctx->video_out) + vo_control_async(mpctx->video_out, VOCTRL_OSD_CHANGED, NULL); if (flags & (UPDATE_SUB_FILT | UPDATE_SUB_HARD)) mp_force_video_refresh(mpctx); mp_wakeup_core(mpctx); |