mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-08 16:35:40 +00:00
splitmuxsrc: Make PTS contiguous by preference
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/4637>
This commit is contained in:
parent
ad40a9323e
commit
131d59518e
1 changed files with 4 additions and 4 deletions
|
@ -158,12 +158,12 @@ handle_buffer_measuring (GstSplitMuxPartReader * reader,
|
|||
* 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
|
||||
|
|
Loading…
Reference in a new issue