]> git.sesse.net Git - vlc/blobdiff - modules/codec/cc.c
Application icons also always should go to /usr/share
[vlc] / modules / codec / cc.c
index 5fd2d031163d726a69596d0238a9e75fe8edb02e..ee202b0ad4940b0fe0bdf8c95e8be1447a31ac1e 100644 (file)
@@ -1,8 +1,7 @@
 /*****************************************************************************
- * cc608.c : CC 608/708 subtitles decoder
+ * cc.c : CC 608/708 subtitles decoder
  *****************************************************************************
- * Copyright (C) 2007 Laurent Aimar
- * $Id$
+ * Copyright © 2007-2010 Laurent Aimar, 2011 VLC authors and VideoLAN
  *
  * Authors: Laurent Aimar < fenrir # via.ecp.fr>
  *
@@ -36,7 +35,7 @@
 #ifdef HAVE_CONFIG_H
 # include "config.h"
 #endif
-#include <string.h>
+
 #include <assert.h>
 
 #include <vlc_common.h>
@@ -750,6 +749,9 @@ static bool Eia608ParsePac( eia608_t *h, uint8_t d1, uint8_t d2 )
     else if( d2 >= 0x40 )
         d2 -= 0x40;
     h->cursor.i_column = pac2_attribs[d2].i_column;
+    h->color = pac2_attribs[d2].i_color;
+    h->font  = pac2_attribs[d2].i_font;
+
     return false;
 }
 
@@ -822,7 +824,7 @@ static void Eia608TextUtf8( char *psz_utf8, uint8_t c ) // Returns number of byt
         E2( 0x86, 0xc2,0xa3), // Pounds sterling
         E3( 0x87, 0xe2,0x99,0xaa), // Music note
         E2( 0x88, 0xc3,0xa0), // lowercase a, grave accent
-        E1( 0x89, 0x20), // transparent space, we make it regular
+        E2( 0x89, 0xc2,0xa0), // transparent space
         E2( 0x8a, 0xc3,0xa8), // lowercase e, grave accent
         E2( 0x8b, 0xc3,0xa2), // lowercase a, circumflex accent
         E2( 0x8c, 0xc3,0xaa), // lowercase e, circumflex accent
@@ -974,7 +976,7 @@ static void Eia608TextLine( struct eia608_screen *screen, char *psz_text, int i_
 
             /* Be sure to create valid html */
             b_close_italics |= b_last_italics && b_close_color;
-            b_close_underline = b_last_underline && ( b_close_italics || b_close_color );
+            b_close_underline |= b_last_underline && ( b_close_italics || b_close_color );
 
             if( b_close_underline )
                 CAT( "</u>" );