[vlc-commits] STL: support background (boxing) style

Jean-Baptiste Kempf git at videolan.org
Thu Jan 26 15:33:18 CET 2017


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Thu Jan 26 15:33:03 2017 +0100| [aa779c24cf072b04d00d8a4440de58f3a9dbb4b2] | committer: Jean-Baptiste Kempf

STL: support background (boxing) style

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

 modules/codec/stl.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/modules/codec/stl.c b/modules/codec/stl.c
index f9e0705..ca628ca 100644
--- a/modules/codec/stl.c
+++ b/modules/codec/stl.c
@@ -101,7 +101,7 @@ static text_segment_t *ParseText(const uint8_t *data, size_t size, const char *c
         if (code & 0x60)
             text[text_size++] = code;
         /* italics begin/end 0x80/0x81, underline being/end 0x82/0x83 */
-        if (code >= 0x80 && code <= 0x83 )
+        if (code >= 0x80 && code <= 0x85 )
         {
             /* Style Change, we do a new segment */
             if( text_size != 0 )
@@ -120,6 +120,10 @@ static text_segment_t *ParseText(const uint8_t *data, size_t size, const char *c
                     style->i_style_flags |= STYLE_UNDERLINE;
                 if (code == 0x83)
                     style->i_style_flags &= STYLE_UNDERLINE;
+                if (code == 0x84)
+                    style->i_style_flags |= STYLE_BACKGROUND;
+                if (code == 0x85)
+                    style->i_style_flags &= STYLE_BACKGROUND;
                 style->i_features |= STYLE_HAS_FLAGS;
             }
         }



More information about the vlc-commits mailing list