]> git.sesse.net Git - vlc/blobdiff - modules/codec/cc.c
Use var_InheritString for --decklink-video-connection.
[vlc] / modules / codec / cc.c
index 3e659cde971561aa7130a5c13031119e7a1ceb36..ee20e50d5e28faa6cd46b0a3d026b450f67e9ae2 100644 (file)
@@ -42,7 +42,6 @@
 #include <vlc_codec.h>
 #include <vlc_input.h>
 
-#include <vlc_osd.h>
 #include <vlc_filter.h>
 #include <vlc_image.h>
 #include <vlc_charset.h>
@@ -327,7 +326,7 @@ static subpicture_t *Subtitle( decoder_t *p_dec, char *psz_subtitle, char *psz_h
         EnsureUTF8( psz_html );
 
     /* Create the subpicture unit */
-    p_spu = decoder_NewSubpicture( p_dec );
+    p_spu = decoder_NewSubpicture( p_dec, NULL );
     if( !p_spu )
     {
         msg_Warn( p_dec, "can't get spu buffer" );
@@ -563,6 +562,9 @@ static void Eia608EraseToEndOfRow( eia608_t *h )
 
 static void Eia608RollUp( eia608_t *h )
 {
+    if( h->mode == EIA608_MODE_TEXT )
+        return;
+
     const int i_screen = Eia608GetWritingScreenIndex( h );
     eia608_screen *screen = &h->screen[i_screen];
 
@@ -616,15 +618,10 @@ static void Eia608ParseChannel( eia608_t *h, const uint8_t d[2] )
 
     /* */
     const int d1 = d[0] & 0x7f;
-    // const int d2 = d[1] & 0x7f;
-    if( d1 == 0x14 )
-        h->i_channel = 1;
-    else if( d1 == 0x1c )
-        h->i_channel = 2;
-    else if( d1 == 0x15 )
+    if( d1 >= 0x10 && d1 <= 0x1f )
+        h->i_channel = 1 + ((d1 & 0x08) != 0);
+    else if( d1 < 0x10 )
         h->i_channel = 3;
-    else if( d1 == 0x1d )
-        h->i_channel = 4;
 }
 static bool Eia608ParseTextAttribute( eia608_t *h, uint8_t d2 )
 {