]> git.sesse.net Git - vlc/commitdiff
CC: use VLC_TS_INVALID (refs #3135)
authorRafaël Carré <rafael.carre@gmail.com>
Mon, 7 Dec 2009 07:24:02 +0000 (08:24 +0100)
committerRafaël Carré <rafael.carre@gmail.com>
Mon, 7 Dec 2009 07:33:56 +0000 (08:33 +0100)
modules/codec/cc.c

index b53a84f5c10b89ad72b43884f4c53e8523a7807e..3e380f9948a76612fc45359ac042447010fe1a1a 100644 (file)
@@ -294,11 +294,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];
         }
@@ -317,7 +317,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;