[vlc-commits] codec: ttml: use resolution after rebase

Francois Cartegnie git at videolan.org
Wed Dec 27 10:10:41 CET 2017


vlc/vlc-3.0 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Dec 27 09:59:40 2017 +0100| [0cd78ca4cf18a0e57941decd8bbc906b2a8d7507] | committer: Francois Cartegnie

codec: ttml: use resolution after rebase

That what happens when you're fed with broken files

partial revert of 58033bc6660b59abf4783d5dbc32d4b614b412de

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

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

diff --git a/modules/codec/ttml/substtml.c b/modules/codec/ttml/substtml.c
index 1f6e2d7ff5..30a22cc2a5 100644
--- a/modules/codec/ttml/substtml.c
+++ b/modules/codec/ttml/substtml.c
@@ -455,7 +455,8 @@ static void ComputeTTMLStyles( ttml_context_t *p_ctx, const vlc_dictionary_t *p_
         p_text_style->f_font_relsize = 100.0 * len.i_value /
                     (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_text_style->f_font_relsize = len.i_value /
+                    (p_ctx->i_cell_resolution_v * TTML_LINE_TO_HEIGHT_RATIO);
     else if( len.unit == TTML_UNIT_PIXELS )
         p_text_style->i_font_size = len.i_value;
 }



More information about the vlc-commits mailing list