Make splitmuxsrc deal better with stream reordering by
making the largest observed PTS contiguous in the
next fragment. Previously, it selected DTS, but then
aligned that with the segment start of the next fragment,
which holds PTS values - leading to glitches in
streams that don't have PTS = DTS at the start.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4660>
* not to generate output timestamps */
/* Update the stored max duration on the pad,
- * always preferring making DTS contiguous
+ * always preferring making reordered PTS contiguous
* where possible */
- if (GST_BUFFER_DTS_IS_VALID (buf))
- ts = GST_BUFFER_DTS (buf) + offset;
- else if (GST_BUFFER_PTS_IS_VALID (buf))
+ if (GST_BUFFER_PTS_IS_VALID (buf))
ts = GST_BUFFER_PTS (buf) + offset;
+ else if (GST_BUFFER_DTS_IS_VALID (buf))
+ ts = GST_BUFFER_DTS (buf) + offset;
GST_DEBUG_OBJECT (reader, "Pad %" GST_PTR_FORMAT
" incoming DTS %" GST_TIME_FORMAT