[vlc-commits] Revert "codec: ttml: no longer need to use resolution after rebase"

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


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

Revert "codec: ttml: no longer need to use resolution after rebase"

That what happens when you're fed with broken files

This reverts commit 1ee818f94cfa168f792d29d98a76feb565ed8c4d.

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

 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