]> git.sesse.net Git - vlc/blobdiff - modules/codec/cc.c
omxil: Skip padding with OMX.SEC.vc1.dec as well
[vlc] / modules / codec / cc.c
index 59da8675b81146291b5ff07814687c97dc60abae..8863f1c6f5aa40afc37aa01b45729bc9251ab96c 100644 (file)
@@ -333,6 +333,7 @@ static subpicture_t *Subtitle( decoder_t *p_dec, char *psz_subtitle, char *psz_h
     p_spu_sys->text  = psz_subtitle;
     p_spu_sys->html  = psz_html;
     p_spu_sys->i_font_height_percent = 5;
+    p_spu_sys->renderbg = true;
 
     return p_spu;
 }
@@ -936,6 +937,10 @@ static void Eia608TextLine( struct eia608_screen *screen, char *psz_text, int i_
     /* Search the start */
     i_start = 0;
 
+    /* Ensure we get a monospaced font (required for accurate positioning */
+    if( b_html )
+        CAT( "<tt>" );
+
     /* Convert leading spaces to non-breaking so that they don't get
        stripped by the RenderHtml routine as regular whitespace */
     while( i_start < EIA608_SCREEN_COLUMNS && p_char[i_start] == ' ' ) {
@@ -1041,6 +1046,7 @@ static void Eia608TextLine( struct eia608_screen *screen, char *psz_text, int i_
             CAT( "</i>" );
         if( last_color != EIA608_COLOR_DEFAULT )
             CAT( "</font>" );
+        CAT( "</tt>" );
     }
 #undef CAT
 }