adaptivedemux: Retry downloading a fragment immediately if any in live streaming

At the moment that demux is waiting manifest update, the target sequence
of fragment was advanced already. So, checking stream_has_next_fragment()
means looking for the next fragment of target fragment.
This might cause unexpected buffering if each fragment has
large duration and manifest is listing only limited number of fragments.

https://bugzilla.gnome.org/show_bug.cgi?id=780494
This commit is contained in:
Seungha Yang 2017-03-24 15:04:21 +09:00 committed by Sebastian Dröge
parent 41996ad9c0
commit ea588ae0e0

View file

@ -2643,7 +2643,8 @@ gst_adaptive_demux_stream_wait_manifest_update (GstAdaptiveDemux * demux,
g_mutex_unlock (&stream->fragment_download_lock);
/* Got a new fragment or not live anymore? */
if (gst_adaptive_demux_stream_has_next_fragment (demux, stream)) {
if (gst_adaptive_demux_stream_update_fragment_info (demux, stream) ==
GST_FLOW_OK) {
GST_DEBUG_OBJECT (demux, "new fragment available, "
"not waiting for manifest update");
ret = TRUE;