]> git.sesse.net Git - vlc/blobdiff - modules/codec/cc.c
Default to rebase on submodule updates to prevent losing local changes.
[vlc] / modules / codec / cc.c
index bf312fd967ca01746f576d3ca9d0311aaf04e8d2..3e659cde971561aa7130a5c13031119e7a1ceb36 100644 (file)
@@ -39,7 +39,6 @@
 
 #include <vlc_common.h>
 #include <vlc_plugin.h>
-#include <vlc_vout.h>
 #include <vlc_codec.h>
 #include <vlc_input.h>
 
@@ -49,7 +48,6 @@
 #include <vlc_charset.h>
 #include <vlc_stream.h>
 #include <vlc_xml.h>
-#include <errno.h>
 #include <string.h>
 
 #include <assert.h>
@@ -295,11 +293,11 @@ static block_t *Pop( decoder_t *p_dec )
         return NULL;
 
     p_block = p_sys->pp_block[i_index = 0];
-    if( p_block->i_pts > 0 )
+    if( p_block->i_pts > VLC_TS_INVALID )
     {
         for( i = 1; i < p_sys->i_block-1; i++ )
         {
-            if( p_sys->pp_block[i]->i_pts > 0 && p_block->i_pts > 0 &&
+            if( p_sys->pp_block[i]->i_pts > VLC_TS_INVALID && p_block->i_pts > VLC_TS_INVALID &&
                 p_sys->pp_block[i]->i_pts < p_block->i_pts )
                 p_block = p_sys->pp_block[i_index = i];
         }
@@ -318,7 +316,7 @@ static subpicture_t *Subtitle( decoder_t *p_dec, char *psz_subtitle, char *psz_h
     video_format_t fmt;
 
     /* We cannot display a subpicture with no date */
-    if( i_pts == 0 )
+    if( i_pts <= VLC_TS_INVALID )
     {
         msg_Warn( p_dec, "subtitle without a date" );
         return NULL;
@@ -341,7 +339,6 @@ static subpicture_t *Subtitle( decoder_t *p_dec, char *psz_subtitle, char *psz_h
     /* Create a new subpicture region */
     memset( &fmt, 0, sizeof(video_format_t) );
     fmt.i_chroma = VLC_CODEC_TEXT;
-    fmt.i_aspect = 0;
     fmt.i_width = fmt.i_height = 0;
     fmt.i_x_offset = fmt.i_y_offset = 0;
     p_spu->p_region = subpicture_region_New( &fmt );
@@ -604,7 +601,7 @@ static void Eia608RollUp( eia608_t *h )
     /* Reset current row */
     Eia608ClearScreenRow( h, i_screen, h->cursor.i_row );
 }
-static void Eia608ParseChannel( eia608_t *h, uint8_t d[2] )
+static void Eia608ParseChannel( eia608_t *h, const uint8_t d[2] )
 {
     /* Check odd parity */
     static const int p4[16] = {
@@ -619,7 +616,7 @@ static void Eia608ParseChannel( eia608_t *h, uint8_t d[2] )
 
     /* */
     const int d1 = d[0] & 0x7f;
-    const int d2 = d[1] & 0x7f;
+    // const int d2 = d[1] & 0x7f;
     if( d1 == 0x14 )
         h->i_channel = 1;
     else if( d1 == 0x1c )
@@ -1144,5 +1141,6 @@ static char *Eia608Text( eia608_t *h, bool b_html )
 
 static void Eia608Exit( eia608_t *h )
 {
+    VLC_UNUSED( h );
 }