From 7f4a09bb8534dfafd83099d773adf2e33c64e267 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 18 Jan 2014 01:19:20 +0100 Subject: sub: uglify OSD code path with locking Do two things: 1. add locking to struct osd_state 2. make struct osd_state opaque While 1. is somewhat simple, 2. is quite horrible. Lots of code accesses lots of osd_state (and osd_object) members. To make sure everything is accessed synchronously, I prefer making osd_state opaque, even if it means adding pretty dumb accessors. All of this is meant to allow running VO in their own threads. Eventually, VOs will request OSD on their own, which means osd_state will be accessed from foreign threads. --- video/out/vo_xv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'video/out/vo_xv.c') diff --git a/video/out/vo_xv.c b/video/out/vo_xv.c index 046dc21d85..53a46cbe5a 100644 --- a/video/out/vo_xv.c +++ b/video/out/vo_xv.c @@ -622,7 +622,7 @@ static void draw_osd(struct vo *vo, struct osd_state *osd) .display_par = 1.0 / vo->aspdat.par, }; - osd_draw_on_image(osd, res, osd->vo_pts, 0, &img); + osd_draw_on_image(osd, res, osd_get_vo_pts(osd), 0, &img); } static void wait_for_completion(struct vo *vo, int max_outstanding) -- cgit v1.2.3