From: Vivia Nikolaidou Date: Fri, 11 Oct 2019 14:25:04 +0000 (+0300) Subject: tsdemux: Always issue a DTS even when it's equal to PTS X-Git-Tag: 1.16.2~15 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=88e5530f59162cf0f31a9cc1c09762ef39a82553;p=platform%2Fupstream%2Fgst-plugins-bad.git 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. --- diff --git a/gst/mpegtsdemux/tsdemux.c b/gst/mpegtsdemux/tsdemux.c index 9f696f0c3..c28516ef7 100644 --- a/gst/mpegtsdemux/tsdemux.c +++ b/gst/mpegtsdemux/tsdemux.c @@ -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;