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:
Thiago Santos 2014-05-05 11:13:09 -03:00
parent 7f81c3b073
commit b891bd04d5

View file

@ -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: %"