[vlc-commits] mpeg-ts: fix PCRCheckDTS() with broken PCR

Petri Hintukainen git at videolan.org
Thu Dec 17 23:58:26 CET 2015


vlc | branch: master | Petri Hintukainen <phintuka at gmail.com> | Thu Dec 17 11:08:58 2015 +0200| [8e123be70e3343f12a5686adfc724e5e63f78c95] | committer: Jean-Baptiste Kempf

mpeg-ts: fix PCRCheckDTS() with broken PCR

Fixes #16148

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 modules/demux/mpeg/ts.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/modules/demux/mpeg/ts.c b/modules/demux/mpeg/ts.c
index 6a6cccf..ac739bd 100644
--- a/modules/demux/mpeg/ts.c
+++ b/modules/demux/mpeg/ts.c
@@ -3091,6 +3091,11 @@ static void PCRCheckDTS( demux_t *p_demux, ts_pmt_t *p_pmt, mtime_t i_pcr)
                             &i_dts, &i_pts, &i_stream_id ) == VLC_EGENERIC )
             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 <= i_pcr) || (i_pts > 0 && i_pts <= 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);
             ParseData( p_demux, p_pid );



More information about the vlc-commits mailing list