diff options
Diffstat (limited to 'sub')
-rw-r--r-- | sub/dec_sub.c | 7 | ||||
-rw-r--r-- | sub/dec_sub.h | 1 | ||||
-rw-r--r-- | sub/osd.c | 2 |
3 files changed, 2 insertions, 8 deletions
diff --git a/sub/dec_sub.c b/sub/dec_sub.c index 6525c41653..a283a5151d 100644 --- a/sub/dec_sub.c +++ b/sub/dec_sub.c @@ -453,12 +453,7 @@ void sub_set_play_dir(struct dec_sub *sub, int dir) pthread_mutex_unlock(&sub->lock); } -bool sub_is_primary_visible(struct dec_sub *sub) -{ - return sub->opts->sub_visibility == 1 || sub->opts->sub_visibility == 2; -} - bool sub_is_secondary_visible(struct dec_sub *sub) { - return sub->opts->sub_visibility == 1 || sub->opts->sub_visibility == 3; + return !!sub->opts->sec_sub_visibility; } diff --git a/sub/dec_sub.h b/sub/dec_sub.h index dea5f7c5b8..6257e74c65 100644 --- a/sub/dec_sub.h +++ b/sub/dec_sub.h @@ -51,7 +51,6 @@ void sub_reset(struct dec_sub *sub); void sub_select(struct dec_sub *sub, bool selected); void sub_set_recorder_sink(struct dec_sub *sub, struct mp_recorder_sink *sink); void sub_set_play_dir(struct dec_sub *sub, int dir); -bool sub_is_primary_visible(struct dec_sub *sub); bool sub_is_secondary_visible(struct dec_sub *sub); int sub_control(struct dec_sub *sub, enum sd_ctrl cmd, void *arg); @@ -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 && sub_is_primary_visible(obj->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)) |