Commit 835a5c00 authored by Laurent Aimar's avatar Laurent Aimar Committed by Jean-Baptiste Kempf

Scale subpictures without AR to fill up the whole display.

It closes #5683
(cherry picked from commit 705d11a4de11c5ab20941f36f93589b855a5c3ce)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent c7d8dd75
......@@ -1042,8 +1042,10 @@ static subpicture_t *SpuRenderSubpictures(spu_t *spu,
/* Compute region scale AR */
video_format_t region_fmt = region->fmt;
if (region_fmt.i_sar_num <= 0 || region_fmt.i_sar_den <= 0) {
region_fmt.i_sar_num = fmt_src->i_sar_num;
region_fmt.i_sar_den = fmt_src->i_sar_den;
region_fmt.i_sar_num = (int64_t)fmt_dst->i_width * fmt_dst->i_sar_num * subpic->i_original_picture_height;
region_fmt.i_sar_den = (int64_t)fmt_dst->i_height * fmt_dst->i_sar_den * subpic->i_original_picture_width;
vlc_ureduce(&region_fmt.i_sar_num, &region_fmt.i_sar_den,
region_fmt.i_sar_num, region_fmt.i_sar_den, 65536);
}
/* Compute scaling from original size to destination size
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment