diff options
Diffstat (limited to 'sub/dec_sub.c')
-rw-r--r-- | sub/dec_sub.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sub/dec_sub.c b/sub/dec_sub.c index a283a5151d..5a49f6e4a3 100644 --- a/sub/dec_sub.c +++ b/sub/dec_sub.c @@ -334,8 +334,6 @@ struct sub_bitmaps *sub_get_bitmaps(struct dec_sub *sub, struct mp_osd_res dim, { pthread_mutex_lock(&sub->lock); - struct mp_subtitle_opts *opts = sub->opts; - pts = pts_to_subtitle(sub, pts); sub->last_vo_pts = pts; @@ -344,7 +342,7 @@ struct sub_bitmaps *sub_get_bitmaps(struct dec_sub *sub, struct mp_osd_res dim, struct sub_bitmaps *res = NULL; if (!(sub->end != MP_NOPTS_VALUE && pts >= sub->end) && - opts->sub_visibility && sub->sd->driver->get_bitmaps) + sub->sd->driver->get_bitmaps) res = sub->sd->driver->get_bitmaps(sub->sd, dim, format, pts); pthread_mutex_unlock(&sub->lock); @@ -453,6 +451,11 @@ 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; +} + bool sub_is_secondary_visible(struct dec_sub *sub) { return !!sub->opts->sec_sub_visibility; |