]> git.sesse.net Git - vlc/commitdiff
* src/input/es_out.c: EN 300 472 allows the PTS of teletext streams to be
authorChristophe Massiot <massiot@videolan.org>
Thu, 13 Jan 2005 19:01:22 +0000 (19:01 +0000)
committerChristophe Massiot <massiot@videolan.org>
Thu, 13 Jan 2005 19:01:22 +0000 (19:01 +0000)
  invalid.

src/input/es_out.c

index 7036b58d0bbcd472e850fee58dd809f4e7f19f02..9031e522859414426439a5b46a4aff39226935fb 100644 (file)
@@ -754,6 +754,17 @@ static int EsOutSend( es_out_t *out, es_out_id_t *es, block_t *p_block )
         p_block->i_pts =
             input_ClockGetTS( p_input, &p_pgrm->clock,
                               ( p_block->i_pts + 11 ) * 9 / 100 ) + i_delay;
+        if ( es->fmt.i_codec == VLC_FOURCC( 't', 'e', 'l', 'x' ) )
+        {
+            mtime_t current_date = mdate();
+            if( p_block->i_pts > current_date + 10000000
+                   || current_date > p_block->i_pts )
+            {
+                /* ETSI EN 300 472 Annex A : do not take into account the PTS
+                 * for teletext streams. */
+                p_block->i_pts = current_date + p_input->i_pts_delay + i_delay;
+            }
+        }
     }
 
     p_block->i_rate = p_input->i_rate;