1
0
mirror of https://github.com/mpv-player/mpv synced 2025-01-04 14:12:10 +00:00
mpv/video
Dudemanguy 07995f5d5f vo_gpu_next: improve updating overlays
fbe154831a 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.
2023-10-05 22:32:06 +00:00
..
decode vd_lavc: by default enable cropping by decoder 2023-09-10 18:33:50 +02:00
filter options: remove ancient option fallbacks/deprecation 2023-09-21 16:06:29 +00:00
out vo_gpu_next: improve updating overlays 2023-10-05 22:32:06 +00:00
csputils.c
csputils.h csputils: add mp_hdr_metadata 2023-08-29 20:58:44 +02:00
cuda.c cuda: move --cuda-device to cuda_opts group 2023-09-22 14:20:38 +00:00
d3d.c
d3d.h
drmprime.c
fmt-conversion.c
fmt-conversion.h
hwdec.c
hwdec.h hwtransfer: use the right hardware config to find conversion targets 2023-08-26 10:07:55 -07:00
image_loader.c
image_loader.h
image_writer.c screenshot: support crop with --screenshot-sw 2023-09-09 00:49:19 +00:00
image_writer.h
img_format.c
img_format.h
mp_image_pool.c
mp_image_pool.h
mp_image.c mp_image: add force_window field 2023-09-21 14:08:52 +00:00
mp_image.h mp_image: add force_window field 2023-09-21 14:08:52 +00:00
repack.c
repack.h
sws_utils.c
sws_utils.h
vaapi.c
vaapi.h
vdpau_functions.inc
vdpau_mixer.c
vdpau_mixer.h
vdpau.c
vdpau.h
zimg.c zimg: fix abort on subsampled input with odd heights 2023-07-26 11:26:36 +02:00
zimg.h