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
@ -868,6 +868,7 @@ _src_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
|
|||||||
* as each fragment for its own has to be reversed */
|
* as each fragment for its own has to be reversed */
|
||||||
demux->discont = TRUE;
|
demux->discont = TRUE;
|
||||||
demux->starting_fragment = FALSE;
|
demux->starting_fragment = FALSE;
|
||||||
|
demux->segment.position = GST_BUFFER_PTS (buffer);
|
||||||
} else {
|
} else {
|
||||||
GST_BUFFER_PTS (buffer) = GST_CLOCK_TIME_NONE;
|
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->starting_fragment = FALSE;
|
||||||
|
|
||||||
demux->segment.position = GST_BUFFER_TIMESTAMP (buffer);
|
|
||||||
|
|
||||||
if (demux->need_segment) {
|
if (demux->need_segment) {
|
||||||
/* And send a newsegment */
|
/* And send a newsegment */
|
||||||
GST_DEBUG_OBJECT (demux, "Sending segment event: %"
|
GST_DEBUG_OBJECT (demux, "Sending segment event: %"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user