[vlc-commits] codec: ttml: fix computing font size (refs #18299)

Francois Cartegnie git at videolan.org
Fri May 12 15:19:42 CEST 2017


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Fri May 12 15:19:00 2017 +0200| [2d1a3da8b943d4b96ae41c9aa05585481aa0a3ab] | committer: Francois Cartegnie

codec: ttml: fix computing font size (refs #18299)

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

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

diff --git a/modules/codec/ttml/substtml.c b/modules/codec/ttml/substtml.c
index 3d93fba470..6302497534 100644
--- a/modules/codec/ttml/substtml.c
+++ b/modules/codec/ttml/substtml.c
@@ -217,7 +217,7 @@ static void FillTextStyle( const char *psz_attr, const char *psz_val,
         char* psz_end = NULL;
         float size = us_strtof( psz_val, &psz_end );
         if( *psz_end == '%' )
-            p_text_style->f_font_relsize = size;
+            p_text_style->f_font_relsize = STYLE_DEFAULT_REL_FONT_SIZE * size / 100.0;
         else
             p_text_style->i_font_size = (int)( size + 0.5 );
     }



More information about the vlc-commits mailing list