mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-20 13:06:23 +00:00
hlsdemux: Only set the segment position if there is a timestamp
Only the first buffer of a fragment has its timestamp set, so only update the segment.position when pushing those buffers to avoid having GST_CLOCK_TIME_NONE set to the position https://bugzilla.gnome.org/show_bug.cgi?id=729364
This commit is contained in:
parent
7f81c3b073
commit
b891bd04d5
1 changed files with 1 additions and 2 deletions
|
@ -868,6 +868,7 @@ _src_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
|
|||
* as each fragment for its own has to be reversed */
|
||||
demux->discont = TRUE;
|
||||
demux->starting_fragment = FALSE;
|
||||
demux->segment.position = GST_BUFFER_PTS (buffer);
|
||||
} else {
|
||||
GST_BUFFER_PTS (buffer) = GST_CLOCK_TIME_NONE;
|
||||
}
|
||||
|
@ -906,8 +907,6 @@ _src_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
|
|||
|
||||
demux->starting_fragment = FALSE;
|
||||
|
||||
demux->segment.position = GST_BUFFER_TIMESTAMP (buffer);
|
||||
|
||||
if (demux->need_segment) {
|
||||
/* And send a newsegment */
|
||||
GST_DEBUG_OBJECT (demux, "Sending segment event: %"
|
||||
|
|
Loading…
Reference in a new issue