Commit 88e5530f authored by Vivia Nikolaidou's avatar Vivia Nikolaidou 🦆 Committed by Tim-Philipp Müller

tsdemux: Always issue a DTS even when it's equal to PTS

Currently tsdemux timestamps only the PTS, and only issues the DTS if
it's different. In that case, parsers tend to estimate the next DTS
based on the previous DTS and the duration, which can accumulate
rounding errors.
parent 91e43072
Pipeline #79207 passed with stages
in 75 minutes and 11 seconds
......@@ -3040,7 +3040,8 @@ gst_ts_demux_push_pending_data (GstTSDemux * demux, TSDemuxStream * stream,
buffer = gst_buffer_list_get (buffer_list, 0);
if (GST_CLOCK_TIME_IS_VALID (stream->pts))
GST_BUFFER_PTS (buffer) = stream->pts;
GST_BUFFER_PTS (buffer) = GST_BUFFER_DTS (buffer) = stream->pts;
/* DTS = PTS by default, we override it if there's a real DTS */
if (GST_CLOCK_TIME_IS_VALID (stream->dts))
GST_BUFFER_DTS (buffer) = stream->dts;
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