diff options
author | Rudolf Polzer <divVerent@xonotic.org> | 2013-11-01 13:15:59 +0100 |
---|---|---|
committer | Rudolf Polzer <divverent@xonotic.org> | 2013-11-07 12:56:07 +0100 |
commit | 49caa0a775be06539a7cd30875f1c80368a7ac55 (patch) | |
tree | 5afa4280cf85e2dfad9339fc852d65912104c58a /sub/sd_ass.c | |
parent | dbb7927a1e8ceeff959500591e9e57d08d85baeb (diff) | |
download | mpv-49caa0a775be06539a7cd30875f1c80368a7ac55.tar.bz2 mpv-49caa0a775be06539a7cd30875f1c80368a7ac55.tar.xz |
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.
Diffstat (limited to 'sub/sd_ass.c')
-rw-r--r-- | sub/sd_ass.c | 5 |
1 files changed, 4 insertions, 1 deletions
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); |