summaryrefslogtreecommitdiffstats
path: root/video/out/vo.h
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2023-09-28 13:07:42 -0500
committerDudemanguy <random342@airmail.cc>2023-10-05 22:32:06 +0000
commit07995f5d5fa38f9060c6bbfd0e51bbfc39b3e236 (patch)
treec07087b2daa170fbe160a2a3c53120af42d8211b /video/out/vo.h
parent61aecfabfd854df409f0129f4abbcd3934e92685 (diff)
downloadmpv-07995f5d5fa38f9060c6bbfd0e51bbfc39b3e236.tar.bz2
mpv-07995f5d5fa38f9060c6bbfd0e51bbfc39b3e236.tar.xz
vo_gpu_next: improve updating overlays
fbe154831a8addfc18a4f81e1c4b9284c31acace added a new VOCTRL to signal when the OSD changed for gpu-next's handling of subtitles, but this is both not necessary and actually incomplete. The VOCTRL would signal OSD changes, but not all subtitle changes (like selecting another non-external sub track for example). VOCTRL_OSD_CHANGED was used to increment p->osd_sync which would then redraw the blended subtitles if the player was paused. But there's already a VOCTRL_PAUSE and VOCTRL_RESUME. Plus, the sub_bitmap_list object will have items in it if it changed in any way, so we don't need the VOCTRL_OSD_CHANGED method at all. That can be removed. The check that fp->osd_sync < p->osd_sync stays in place since that's an optimization while the video is playing, but we also check the pause state as well since the VO can know this. If we're paused, then always do update_overlays since core must be signalling a redraw to us if we get a draw_frame call here. Additionally in update_overlays itself, the p->osd_sync counter is incremented if we have any items since the frame signature will need that. As for the actual bug that is fixed, changing subtitle tracks while paused with blended subtitles now correctly works. Previously, it was never updated so the old subtitle stayed there forever until you deselected it (since VOCTRL_OSD_CHANGED triggered there). Also include some cosmetic code fixes that were noticed.
Diffstat (limited to 'video/out/vo.h')
-rw-r--r--video/out/vo.h3
1 files changed, 0 insertions, 3 deletions
diff --git a/video/out/vo.h b/video/out/vo.h
index a6c6a3ce6e..e0b24d4cf7 100644
--- a/video/out/vo.h
+++ b/video/out/vo.h
@@ -72,9 +72,6 @@ enum mp_voctrl {
// you could install your own listener.
VOCTRL_VO_OPTS_CHANGED,
- // Triggered by any change to the OSD (e.g. OSD style changes)
- VOCTRL_OSD_CHANGED,
-
/* private to vo_gpu */
VOCTRL_LOAD_HWDEC_API,