[vlc-commits] demux:ps: init the last pts to VLC_TICK_INVALID
Steve Lhomme
git at videolan.org
Tue Sep 18 09:43:49 CEST 2018
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Mon May 7 10:40:32 2018 +0200| [299defb247c92de0af7305d9dae167877da864e2] | committer: Steve Lhomme
demux:ps: init the last pts to VLC_TICK_INVALID
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=299defb247c92de0af7305d9dae167877da864e2
---
modules/demux/mpeg/ps.c | 2 +-
modules/demux/mpeg/ps.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules/demux/mpeg/ps.c b/modules/demux/mpeg/ps.c
index b00097c383..dccfaab96e 100644
--- a/modules/demux/mpeg/ps.c
+++ b/modules/demux/mpeg/ps.c
@@ -310,7 +310,7 @@ static int Probe( demux_t *p_demux, bool b_end )
if( !ps_pkt_parse_pes( VLC_OBJECT(p_demux), p_pkt, tk->i_skip ) &&
p_pkt->i_pts != VLC_TICK_INVALID )
{
- if( b_end && p_pkt->i_pts > tk->i_last_pts )
+ if( b_end && (tk->i_last_pts == VLC_TICK_INVALID || p_pkt->i_pts > tk->i_last_pts) )
{
tk->i_last_pts = p_pkt->i_pts;
}
diff --git a/modules/demux/mpeg/ps.h b/modules/demux/mpeg/ps.h
index 904c5ef8fa..7917cb3a4d 100644
--- a/modules/demux/mpeg/ps.h
+++ b/modules/demux/mpeg/ps.h
@@ -79,7 +79,7 @@ static inline void ps_track_init( ps_track_t tk[PS_TK_COUNT] )
tk[i].i_next_block_flags = 0;
tk[i].es = NULL;
tk[i].i_first_pts = VLC_TICK_INVALID;
- tk[i].i_last_pts = -1;
+ tk[i].i_last_pts = VLC_TICK_INVALID;
es_format_Init( &tk[i].fmt, UNKNOWN_ES, 0 );
}
}
More information about the vlc-commits
mailing list