diff options
author | Zsolt Vadasz <zsolt_vadasz@protonmail.com> | 2021-01-13 16:59:08 +0100 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2021-05-19 15:56:43 +0000 |
commit | 62f225ef9d6e30c286c6a94f3bef147f7114696c (patch) | |
tree | f23b7a13b2a4250aaefa0a3784c86db82e3b825f /sub/osd.c | |
parent | da0c1b8404fc17586dd945b013ee732cc4628a7c (diff) | |
download | mpv-62f225ef9d6e30c286c6a94f3bef147f7114696c.tar.bz2 mpv-62f225ef9d6e30c286c6a94f3bef147f7114696c.tar.xz |
sub/osd: hide secondary subtitles if secondary-sub-visibility is false
Diffstat (limited to 'sub/osd.c')
-rw-r--r-- | sub/osd.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -290,9 +290,12 @@ static struct sub_bitmaps *render_object(struct osd_state *osd, check_obj_resize(osd, osdres, obj); - if (obj->type == OSDTYPE_SUB || obj->type == OSDTYPE_SUB2) { + if (obj->type == OSDTYPE_SUB) { if (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)) + res = sub_get_bitmaps(obj->sub, obj->vo_res, format, video_pts); } else if (obj->type == OSDTYPE_EXTERNAL2) { if (obj->external2 && obj->external2->format) { res = sub_bitmaps_copy(NULL, obj->external2); // need to be owner |