From 49caa0a775be06539a7cd30875f1c80368a7ac55 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Fri, 1 Nov 2013 13:15:59 +0100 Subject: sd_ass, sd_lavc: use the input video's pixel aspect for scaling subtitles. The previous code used the output video's pixel aspect for stretching purposes, breaking rendering with e.g. -vf scale in the chain. Now subtitles are stretched using the input video's pixel aspect only, matching the intentions of the original subtitle author. --- sub/sd_ass.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'sub/sd_ass.c') diff --git a/sub/sd_ass.c b/sub/sd_ass.c index 591f9d5105..fd545cdbda 100644 --- a/sub/sd_ass.c +++ b/sub/sd_ass.c @@ -142,7 +142,10 @@ static void get_bitmaps(struct sd *sd, struct mp_osd_res dim, double pts, if (!ctx->is_converted && (!opts->ass_style_override || opts->ass_vsfilter_aspect_compat)) { - scale = scale * dim.video_par; + // Let's use the original video PAR for vsfilter compatibility: + scale = scale + * (ctx->video_params.d_w / (double)ctx->video_params.d_h) + / (ctx->video_params.w / (double)ctx->video_params.h); } mp_ass_configure(renderer, opts, &dim); ass_set_aspect_ratio(renderer, scale, 1); -- cgit v1.2.3