demux: ogg: only invalid pts on no granule interpolation
authorFrancois Cartegnie <fcvlcdev@free.fr>
Wed, 13 Feb 2019 17:53:46 +0000 (18:53 +0100)
committerFrancois Cartegnie <fcvlcdev@free.fr>
Wed, 13 Feb 2019 18:00:21 +0000 (19:00 +0100)
modules/demux/ogg.c

index f260de4..5ef3586 100644 (file)
@@ -1411,7 +1411,10 @@ static void Ogg_DecodePacket( demux_t *p_demux,
     }
     else if( p_stream->fmt.i_cat == AUDIO_ES )
     {
-        p_block->i_pts = p_stream->b_interpolation_failed ? VLC_TICK_INVALID : p_block->i_dts;
+        if( p_stream->b_interpolation_failed && p_oggpacket->granulepos < 0 )
+            p_block->i_pts = VLC_TICK_INVALID;
+        else
+            p_block->i_pts = p_block->i_dts;
     }
     else if( p_stream->fmt.i_cat == SPU_ES )
     {