summaryrefslogtreecommitdiffstats
path: root/sub/osd.c
diff options
context:
space:
mode:
Diffstat (limited to 'sub/osd.c')
-rw-r--r--sub/osd.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sub/osd.c b/sub/osd.c
index 16c1288f5d..56d845b97f 100644
--- a/sub/osd.c
+++ b/sub/osd.c
@@ -246,6 +246,9 @@ void osd_draw(struct osd_state *osd, struct mp_osd_res res,
if ((draw_flags & OSD_DRAW_SUB_ONLY) && !obj->is_sub)
continue;
+ if (obj->dec_sub)
+ sub_lock(obj->dec_sub);
+
struct sub_bitmaps imgs;
render_object(osd, obj, res, video_pts, formats, &imgs);
if (imgs.num_parts > 0) {
@@ -256,6 +259,9 @@ void osd_draw(struct osd_state *osd, struct mp_osd_res res,
obj->type, imgs.format);
}
}
+
+ if (obj->dec_sub)
+ sub_unlock(obj->dec_sub);
}
}