]> git.sesse.net Git - vlc/commitdiff
do not mind large time discontinuities in SPU streams these are to be expected, so...
authorVincent Penquerc'h <ogg.k.ogg.k@googlemail.com>
Tue, 11 Nov 2008 20:56:06 +0000 (20:56 +0000)
committerLaurent Aimar <fenrir@videolan.org>
Sat, 15 Nov 2008 12:26:08 +0000 (13:26 +0100)
Signed-off-by: Laurent Aimar <fenrir@videolan.org>
modules/demux/ogg.c

index 4e888aa4c2a6a570a9bd77d82cedec907f3bd378..4d9c12791e7fcb20d69c4a8e4cd67ccb7e22dfd3 100644 (file)
@@ -674,17 +674,21 @@ static void Ogg_DecodePacket( demux_t *p_demux,
     i_interpolated_pts = p_stream->i_interpolated_pcr;
     Ogg_UpdatePCR( p_stream, p_oggpacket );
 
-    if( p_stream->i_pcr >= 0 )
+    /* SPU streams are typically discontinuous, do not mind large gaps */
+    if( p_stream->fmt.i_cat != SPU_ES )
     {
-        /* This is for streams where the granulepos of the header packets
-         * doesn't match these of the data packets (eg. ogg web radios). */
-        if( p_stream->i_previous_pcr == 0 &&
-            p_stream->i_pcr  > 3 * DEFAULT_PTS_DELAY )
+        if( p_stream->i_pcr >= 0 )
         {
-            es_out_Control( p_demux->out, ES_OUT_RESET_PCR );
+            /* This is for streams where the granulepos of the header packets
+             * doesn't match these of the data packets (eg. ogg web radios). */
+            if( p_stream->i_previous_pcr == 0 &&
+                p_stream->i_pcr  > 3 * DEFAULT_PTS_DELAY )
+            {
+                es_out_Control( p_demux->out, ES_OUT_RESET_PCR );
 
-            /* Call the pace control */
-            es_out_Control( p_demux->out, ES_OUT_SET_PCR, p_stream->i_pcr );
+                /* Call the pace control */
+                es_out_Control( p_demux->out, ES_OUT_SET_PCR, p_stream->i_pcr );
+            }
         }
     }