mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-02 21:48:55 +00:00
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
This commit is contained in:
parent
9777fc5cb5
commit
3a055ac2d1
1 changed files with 7 additions and 5 deletions
|
@ -1237,17 +1237,19 @@ gst_dash_demux_reset (GstDashDemux * demux, gboolean dispose)
|
||||||
static GstClockTime
|
static GstClockTime
|
||||||
gst_dash_demux_get_buffering_time (GstDashDemux * demux)
|
gst_dash_demux_get_buffering_time (GstDashDemux * demux)
|
||||||
{
|
{
|
||||||
GstClockTime buffer_time = 0;
|
GstClockTime buffer_time = GST_CLOCK_TIME_NONE;
|
||||||
GSList *iter;
|
GSList *iter;
|
||||||
|
|
||||||
for (iter = demux->streams; iter; iter = g_slist_next (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)
|
if (!GST_CLOCK_TIME_IS_VALID (buffer_time) || buffer_time > btime)
|
||||||
return buffer_time;
|
buffer_time = btime;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
if (!GST_CLOCK_TIME_IS_VALID (buffer_time))
|
||||||
|
buffer_time = 0;
|
||||||
|
return buffer_time;
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstClockTime
|
static GstClockTime
|
||||||
|
|
Loading…
Reference in a new issue