From: Thiago Santos Date: Tue, 29 Jan 2013 16:04:01 +0000 (-0300) Subject: dashdemux: Use the smallest queue value to define buffering state X-Git-Tag: 1.19.3~507^2~13579 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3a055ac2d10b055749c3aff6ee5555e9538ec69d;p=platform%2Fupstream%2Fgstreamer.git dashdemux: Use the smallest queue value to define buffering state The smallest queue should be used to prevent blocking the download thread when a stream has too much data buffered, leaving the other streams starving from fragments --- diff --git a/ext/dash/gstdashdemux.c b/ext/dash/gstdashdemux.c index 1bfc805..b07d54a 100644 --- a/ext/dash/gstdashdemux.c +++ b/ext/dash/gstdashdemux.c @@ -1237,17 +1237,19 @@ gst_dash_demux_reset (GstDashDemux * demux, gboolean dispose) static GstClockTime gst_dash_demux_get_buffering_time (GstDashDemux * demux) { - GstClockTime buffer_time = 0; + GstClockTime buffer_time = GST_CLOCK_TIME_NONE; GSList *iter; for (iter = demux->streams; iter; iter = g_slist_next (iter)) { - buffer_time = gst_dash_demux_stream_get_buffering_time (iter->data); + GstClockTime btime = gst_dash_demux_stream_get_buffering_time (iter->data); - if (buffer_time) - return buffer_time; + if (!GST_CLOCK_TIME_IS_VALID (buffer_time) || buffer_time > btime) + buffer_time = btime; } - return 0; + if (!GST_CLOCK_TIME_IS_VALID (buffer_time)) + buffer_time = 0; + return buffer_time; } static GstClockTime