summaryrefslogtreecommitdiffstats
path: root/sub/osd.c
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2022-01-19 11:23:52 -0600
committerDudemanguy <random342@airmail.cc>2022-01-22 16:22:25 +0000
commit024e0cd4c1405a41edd6a8b302ec6b747bc60ea3 (patch)
tree5df7dfe8d7d860e70ef57c5143d345b8c1da8cc3 /sub/osd.c
parent9cddd73f67f11dba2f2921124e2c39c77af01651 (diff)
downloadmpv-024e0cd4c1405a41edd6a8b302ec6b747bc60ea3.tar.bz2
mpv-024e0cd4c1405a41edd6a8b302ec6b747bc60ea3.tar.xz
options: only apply sub-visibility to primary subs
Previously, the sub-visibility option changed the visibility of all subtitles including secondary ones. This meant that it was not possible to only display secondary subtitles while hiding the primary ones. This modifies the sub-visibility option so that it only affects primary subtitles which allows only secondary subtitles to be displayed.
Diffstat (limited to 'sub/osd.c')
-rw-r--r--sub/osd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sub/osd.c b/sub/osd.c
index e422716ada..297ad88fe8 100644
--- a/sub/osd.c
+++ b/sub/osd.c
@@ -291,7 +291,7 @@ static struct sub_bitmaps *render_object(struct osd_state *osd,
check_obj_resize(osd, osdres, obj);
if (obj->type == OSDTYPE_SUB) {
- if (obj->sub)
+ if (obj->sub && sub_is_primary_visible(obj->sub))
res = sub_get_bitmaps(obj->sub, obj->vo_res, format, video_pts);
} else if (obj->type == OSDTYPE_SUB2) {
if (obj->sub && sub_is_secondary_visible(obj->sub))