[vlc-commits] codec: ttml: fix inverted cell linegap ratio

Francois Cartegnie git at videolan.org
Tue Dec 12 11:47:47 CET 2017


vlc/vlc-3.0 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Dec 11 15:56:19 2017 +0100| [9625967df519f6096d89acb9f6df830fd9936431] | committer: Francois Cartegnie

codec: ttml: fix inverted cell linegap ratio

(cherry picked from commit 2a1542ea5ac930eff7a372f29944fcb951e1b629)

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=9625967df519f6096d89acb9f6df830fd9936431
---

 modules/codec/ttml/substtml.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/codec/ttml/substtml.c b/modules/codec/ttml/substtml.c
index 2feabd41db..118dc76134 100644
--- a/modules/codec/ttml/substtml.c
+++ b/modules/codec/ttml/substtml.c
@@ -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 );
 }



More information about the vlc-commits mailing list