From b891bd04d50424410c43865f30150e3553f84b59 Mon Sep 17 00:00:00 2001 From: Thiago Santos Date: Mon, 5 May 2014 11:13:09 -0300 Subject: [PATCH] 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 --- ext/hls/gsthlsdemux.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ext/hls/gsthlsdemux.c b/ext/hls/gsthlsdemux.c index 456baa9d49..653e7f5228 100644 --- a/ext/hls/gsthlsdemux.c +++ b/ext/hls/gsthlsdemux.c @@ -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: %"