[vlc-commits] demux: ts: fix delay detection near clock wrap around
Francois Cartegnie
git at videolan.org
Thu Aug 4 16:00:29 CEST 2016
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Aug 4 15:57:32 2016 +0200| [ace2299bd861a0b3d98bf92e62376581b09f6c42] | committer: Francois Cartegnie
demux: ts: fix delay detection near clock wrap around
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ace2299bd861a0b3d98bf92e62376581b09f6c42
---
modules/demux/mpeg/ts.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/modules/demux/mpeg/ts.c b/modules/demux/mpeg/ts.c
index eaf4519..e8ed59f 100644
--- a/modules/demux/mpeg/ts.c
+++ b/modules/demux/mpeg/ts.c
@@ -1448,10 +1448,10 @@ static void ParsePES( demux_t *p_demux, ts_pid_t *pid, block_t *p_pes )
(p_es->fmt.i_cat == VIDEO_ES || p_es->fmt.i_cat == AUDIO_ES) )
{
int64_t i_dts27 = (p_block->i_dts - VLC_TS_0) * 9 / 100;
- int64_t i_pcr = TimeStampWrapAround( p_pmt->pcr.i_first, p_pmt->pcr.i_current );
- if( i_dts27 < i_pcr )
+ i_dts27 = TimeStampWrapAround( p_pmt->pcr.i_first, p_pmt->pcr.i_current );
+ if( i_dts27 < p_pmt->pcr.i_current )
{
- p_pmt->pcr.i_pcroffset = i_pcr - i_dts27 + 80000;
+ p_pmt->pcr.i_pcroffset = p_pmt->pcr.i_current - i_dts27 + 80000;
msg_Warn( p_demux, "Broken stream: pid %d sends packets with dts %"PRId64
"us later than pcr, applying delay",
pid->i_pid, p_pmt->pcr.i_pcroffset * 100 / 9 );
More information about the vlc-commits
mailing list