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/sd_ass.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sub/sd_ass.c') diff --git a/sub/sd_ass.c b/sub/sd_ass.c index 879d528fb7..7abeea9eeb 100644 --- a/sub/sd_ass.c +++ b/sub/sd_ass.c @@ -420,8 +420,8 @@ static long long find_timestamp(struct sd *sd, double pts) #undef END -static void get_bitmaps(struct sd *sd, struct mp_osd_res dim, double pts, - struct sub_bitmaps *res) +static void get_bitmaps(struct sd *sd, struct mp_osd_res dim, int format, + double pts, struct sub_bitmaps *res) { struct sd_ass_priv *ctx = sd->priv; struct MPOpts *opts = sd->opts; @@ -464,7 +464,7 @@ static void get_bitmaps(struct sd *sd, struct mp_osd_res dim, double pts, int changed; ASS_Image *imgs = ass_render_frame(renderer, track, ts, &changed); - mp_ass_packer_pack(ctx->packer, &imgs, 1, changed, SUBBITMAP_LIBASS, res); + mp_ass_packer_pack(ctx->packer, &imgs, 1, changed, format, res); if (!converted && res->num_parts > 0) { // mangle_colors() modifies the color field, so copy the thing. -- cgit v1.2.3