From dc5d7d258e4abbbc73a94ca05000e24c4b19accf Mon Sep 17 00:00:00 2001 From: Gianluca Gennari Date: Wed, 24 Oct 2012 14:50:54 +0200 Subject: [PATCH] dashdemux: use effective segment duration to reschedule the streaming task do not assume segment duration is constant Conflicts: ext/dash/gstdashdemux.c --- ext/dash/gstdashdemux.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ext/dash/gstdashdemux.c b/ext/dash/gstdashdemux.c index 23826f61ce..38f8d8bd46 100644 --- a/ext/dash/gstdashdemux.c +++ b/ext/dash/gstdashdemux.c @@ -935,6 +935,7 @@ gst_dash_demux_stream_loop (GstDashDemux * demux) GstBufferList *buffer_list; guint nb_adaptation_set = 0; GstActiveStream *stream; + GstClockTime duration = 0; /* Wait until the next scheduled push downstream */ if (g_cond_timed_wait (GST_TASK_GET_COND (demux->stream_task), @@ -972,6 +973,7 @@ gst_dash_demux_stream_loop (GstDashDemux * demux) for (i = 0; i < nb_adaptation_set; i++) { GstFragment *fragment = g_list_nth_data (listfragment, i); stream = gst_mpdparser_get_active_stream_by_index (demux->client, i); + duration = fragment->stop_time - fragment->start_time; if (demux->need_segment) { GstClockTime start = fragment->start_time + demux->position_shift; /* And send a newsegment */