Commit 466cb4ed authored by Jan Ekström's avatar Jan Ekström

lavc/libaribb24: use integer math to calculate font scaling

parent 1ed9e8e9
...@@ -249,11 +249,11 @@ static int libaribb24_handle_regions(AVCodecContext *avctx, AVSubtitle *sub) ...@@ -249,11 +249,11 @@ static int libaribb24_handle_regions(AVCodecContext *avctx, AVSubtitle *sub)
// font size // font size
if (region->i_fontwidth != profile_font_size || if (region->i_fontwidth != profile_font_size ||
region->i_fontheight != profile_font_size) { region->i_fontheight != profile_font_size) {
av_bprintf(&buf, "{\\fscx%d\\fscy%d}", av_bprintf(&buf, "{\\fscx%"PRId64"\\fscy%"PRId64"}",
(int)round(((double)region->i_fontwidth / av_rescale(region->i_fontwidth, 100,
(double)profile_font_size) * 100), profile_font_size),
(int)round(((double)region->i_fontheight / av_rescale(region->i_fontheight, 100,
(double)profile_font_size) * 100)); profile_font_size));
} }
// TODO: positioning // TODO: positioning
......
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