hlsdemux: Start fetching new fragments whenever we have less fragments cached than given by the fragments-cache property

Waiting until our cache is empty before starting to fetch the next fragment
kind of defeats the purpose of caching multiple fragments.
This commit is contained in:
Sebastian Dröge 2014-02-10 18:27:58 +01:00
parent 89c592ccdd
commit 4f04f3e68e

View file

@ -921,7 +921,7 @@ gst_hls_demux_updates_loop (GstHLSDemux * demux)
goto quit;
/* fetch the next fragment */
if (g_queue_is_empty (demux->queue)) {
if (g_queue_get_length (demux->queue) < demux->fragments_cache) {
GST_DEBUG_OBJECT (demux, "queue empty, get next fragment");
if (!gst_hls_demux_get_next_fragment (demux, FALSE)) {
if (demux->cancelled) {