mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
adaptivedemux: only update segment if we have a valid PTS
Otherwise we set the position to GST_CLOCK_TIME_NONE and it disrupts bitrate switching
This commit is contained in:
parent
de246c6741
commit
c1251ab861
1 changed files with 4 additions and 2 deletions
|
@ -1229,7 +1229,8 @@ _src_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
|
|||
GST_LOG_OBJECT (stream->pad, "set fragment pts=%" GST_TIME_FORMAT,
|
||||
GST_TIME_ARGS (GST_BUFFER_PTS (buffer)));
|
||||
|
||||
stream->segment.position = GST_BUFFER_PTS (buffer);
|
||||
if (GST_BUFFER_PTS_IS_VALID (buffer))
|
||||
stream->segment.position = GST_BUFFER_PTS (buffer);
|
||||
|
||||
} else {
|
||||
GST_BUFFER_PTS (buffer) = GST_CLOCK_TIME_NONE;
|
||||
|
@ -1261,7 +1262,8 @@ _src_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
|
|||
discont = TRUE;
|
||||
|
||||
GST_BUFFER_PTS (buffer) = stream->fragment.timestamp;
|
||||
stream->segment.position = GST_BUFFER_PTS (buffer);
|
||||
if (GST_BUFFER_PTS_IS_VALID (buffer))
|
||||
stream->segment.position = GST_BUFFER_PTS (buffer);
|
||||
} else {
|
||||
GST_BUFFER_PTS (buffer) = GST_CLOCK_TIME_NONE;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue