[vlc-commits] demux: ogg: only invalid pts on no granule interpolation

Francois Cartegnie git at videolan.org
Wed Feb 13 19:00:39 CET 2019


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Feb 13 18:53:46 2019 +0100| [04790d57da3b497621c2314188ab777cbeb21d7c] | committer: Francois Cartegnie

demux: ogg: only invalid pts on no granule interpolation

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=04790d57da3b497621c2314188ab777cbeb21d7c
---

 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 )
     {



More information about the vlc-commits mailing list