From f1105528981fc83c5dbf15f1c1d409fb8842a1ea Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 3 Jul 2016 18:33:28 +0200 Subject: sub: pass preferred OSD format to subtitle renderers The intention is to let mp_ass_packer_pack() produce different output for the RGBA and LIBASS formats. VOs (or whatever generates the OSD) currently do not signal a preferred format, and this mechanism just exists to switch between RGBA and LIBASS formats correctly, preferring LIBASS if the VO supports it. --- sub/dec_sub.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sub/dec_sub.c') diff --git a/sub/dec_sub.c b/sub/dec_sub.c index 3b1e957038..22dc3328b8 100644 --- a/sub/dec_sub.c +++ b/sub/dec_sub.c @@ -255,8 +255,8 @@ bool sub_read_packets(struct dec_sub *sub, double video_pts) // You must call sub_lock/sub_unlock if more than 1 thread access sub. // The issue is that *res will contain decoder allocated data, which might // be deallocated on the next decoder access. -void sub_get_bitmaps(struct dec_sub *sub, struct mp_osd_res dim, double pts, - struct sub_bitmaps *res) +void sub_get_bitmaps(struct dec_sub *sub, struct mp_osd_res dim, int format, + double pts, struct sub_bitmaps *res) { struct MPOpts *opts = sub->opts; @@ -267,7 +267,7 @@ void sub_get_bitmaps(struct dec_sub *sub, struct mp_osd_res dim, double pts, return; if (opts->sub_visibility && sub->sd->driver->get_bitmaps) - sub->sd->driver->get_bitmaps(sub->sd, dim, pts, res); + sub->sd->driver->get_bitmaps(sub->sd, dim, format, pts, res); } // See sub_get_bitmaps() for locking requirements. -- cgit v1.2.3