[vlc-devel] [PATCH] ts: fix applying pcr offset in PCRCheckDTS()
Petri Hintukainen
phintuka at gmail.com
Sat Feb 27 21:50:46 CET 2016
Improve logging
---
modules/demux/mpeg/ts.c | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/modules/demux/mpeg/ts.c b/modules/demux/mpeg/ts.c
index bd7a5b2..6295093 100644
--- a/modules/demux/mpeg/ts.c
+++ b/modules/demux/mpeg/ts.c
@@ -2120,16 +2120,23 @@ static void PCRCheckDTS( demux_t *p_demux, ts_pmt_t *p_pmt, mtime_t i_pcr)
continue;
if (p_pmt->pcr.i_pcroffset > 0) {
- i_dts += p_pmt->pcr.i_pcroffset;
- i_pts += p_pmt->pcr.i_pcroffset;
+ if( i_dts > 0 ) {
+ i_dts += p_pmt->pcr.i_pcroffset;
+ }
+ if( i_pts > 0 ) {
+ i_pts += p_pmt->pcr.i_pcroffset;
+ }
}
i_dts = TimeStampWrapAround( i_pcr, i_dts );
i_pts = TimeStampWrapAround( i_pcr, i_pts );
- if ((i_dts > 0 && i_dts <= i_pcr) || (i_pts > 0 && i_pts <= i_pcr)) {
+ if( i_dts > 0 && i_dts <= i_pcr ) {
msg_Err( p_demux, "send queued data for pid %d: DTS %"PRId64" >= PCR %"PRId64"\n", p_pid->i_pid, i_dts, i_pcr);
ParsePESDataChain( p_demux, p_pid );
+ } else if( i_pts > 0 && i_pts <= i_pcr ) {
+ msg_Err( p_demux, "send queued data for pid %d: PTS %"PRId64" >= PCR %"PRId64"\n", p_pid->i_pid, i_pts, i_pcr);
+ ParsePESDataChain( p_demux, p_pid );
}
}
}
--
2.5.0
More information about the vlc-devel
mailing list