Commit 440eec35 authored by Petri Hintukainen's avatar Petri Hintukainen Committed by Jean-Baptiste Kempf

ts: fix applying pcr offset in PCRCheckDTS()

Improve logging
Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent 1d6fbeca
......@@ -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 );
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment