Commit 9625967d authored by François Cartegnie's avatar François Cartegnie 🤞

codec: ttml: fix inverted cell linegap ratio

(cherry picked from commit 2a1542ea)
parent 41c7abb6
......@@ -437,10 +437,10 @@ static void ComputeTTMLStyles( ttml_context_t *p_ctx, const vlc_dictionary_t *p_
len = ttml_rebase_length( len, p_ctx->root_extent_h );
if( len.unit == TTML_UNIT_CELL )
p_text_style->f_font_relsize = 100.0 * len.i_value /
(p_ctx->i_cell_resolution_v / TTML_LINE_TO_HEIGHT_RATIO);
(p_ctx->i_cell_resolution_v * TTML_LINE_TO_HEIGHT_RATIO);
else if( len.unit == TTML_UNIT_PERCENT )
p_text_style->f_font_relsize = len.i_value /
(p_ctx->i_cell_resolution_v / TTML_LINE_TO_HEIGHT_RATIO);
(p_ctx->i_cell_resolution_v * TTML_LINE_TO_HEIGHT_RATIO);
else if( len.unit == TTML_UNIT_PIXELS )
p_text_style->i_font_size = (int)( len.i_value + 0.5 );
}
......
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