[vlc-commits] tx3g: font size is absolute

Francois Cartegnie git at videolan.org
Wed Jul 6 19:09:32 CEST 2016


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Jul  4 13:13:29 2016 +0200| [e980788a51cc7afdcdd89e95b4bf17a4c9786a4d] | committer: Francois Cartegnie

tx3g: font size is absolute

misinterpreted spec when trying to fix
against the prev broken styles

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

 modules/codec/substx3g.c    |    4 ++--
 modules/demux/mp4/essetup.c |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/modules/codec/substx3g.c b/modules/codec/substx3g.c
index f38a61c..dbd4c51 100644
--- a/modules/codec/substx3g.c
+++ b/modules/codec/substx3g.c
@@ -364,7 +364,7 @@ static subpicture_t *Decode( decoder_t *p_dec, block_t **pp_block )
                 text_style_t style;
                 memset( &style, 0, sizeof(text_style_t) );
                 style.i_style_flags = ConvertFlags( p_buf[6] );
-                style.f_font_relsize = p_buf[7] * 5 / 100; /* in % units of 0.05 height */
+                style.i_font_size = p_buf[7];
                 style.i_font_color = GetDWBE(p_buf+8) >> 8;// RGBA -> RGB
                 style.i_font_alpha = GetDWBE(p_buf+8) & 0xFF;
                 style.i_features = STYLE_HAS_FONT_COLOR | STYLE_HAS_FONT_ALPHA;
@@ -377,7 +377,7 @@ static subpicture_t *Decode( decoder_t *p_dec, block_t **pp_block )
                         if( (p_spu_sys->p_default_style->i_style_flags = ConvertFlags( p_buf[6] )) )
                             p_spu_sys->p_default_style->i_features |= STYLE_HAS_FLAGS;
                     }
-                    p_spu_sys->p_default_style->f_font_relsize = p_buf[7] * 5 / 100;
+                    p_spu_sys->p_default_style->i_font_size = p_buf[7];
                     p_spu_sys->p_default_style->i_font_color = GetDWBE(p_buf+8) >> 8;// RGBA -> ARGB
                     p_spu_sys->p_default_style->i_font_alpha = (GetDWBE(p_buf+8) & 0xFF) << 24;
                     p_spu_sys->p_default_style->i_features |= (STYLE_HAS_FONT_COLOR | STYLE_HAS_FONT_ALPHA);
diff --git a/modules/demux/mp4/essetup.c b/modules/demux/mp4/essetup.c
index a487eac..939d72b 100644
--- a/modules/demux/mp4/essetup.c
+++ b/modules/demux/mp4/essetup.c
@@ -1101,7 +1101,7 @@ int SetupSpuES( demux_t *p_demux, mp4_track_t *p_track, MP4_Box_t *p_sample )
             {
                 if ( p_text->i_font_size ) /* !WARN: in % of 5% height */
                 {
-                    p_style->f_font_relsize = p_text->i_font_size * 5 / 100;
+                    p_style->i_font_size = p_text->i_font_size;
                 }
                 if ( p_text->i_font_color )
                 {



More information about the vlc-commits mailing list