From 04790d57da3b497621c2314188ab777cbeb21d7c Mon Sep 17 00:00:00 2001 From: Francois Cartegnie Date: Wed, 13 Feb 2019 18:53:46 +0100 Subject: [PATCH] demux: ogg: only invalid pts on no granule interpolation --- modules/demux/ogg.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/demux/ogg.c b/modules/demux/ogg.c index f260de4061..5ef358692b 100644 --- a/modules/demux/ogg.c +++ b/modules/demux/ogg.c @@ -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 ) { -- 2.11.4.GIT