adaptivedemux: reworking live manifest update wait
Check if the stream is live before checking if it is EOS as a live stream might be considered EOS when it just needs to wait for a manifest update to proceed with the next fragments
This commit is contained in:
parent
66202d4c1b
commit
df66909129
@ -1876,25 +1876,26 @@ gst_adaptive_demux_stream_download_loop (GstAdaptiveDemuxStream * stream)
|
|||||||
case GST_FLOW_OK:
|
case GST_FLOW_OK:
|
||||||
break; /* all is good, let's go */
|
break; /* all is good, let's go */
|
||||||
case GST_FLOW_EOS:
|
case GST_FLOW_EOS:
|
||||||
GST_DEBUG_OBJECT (stream->pad, "EOS, stopping download loop");
|
GST_DEBUG_OBJECT (stream->pad, "EOS, checking to stop download loop");
|
||||||
/* we push the EOS after releasing the object lock */
|
/* we push the EOS after releasing the object lock */
|
||||||
|
if (gst_adaptive_demux_is_live (demux)) {
|
||||||
if (gst_adaptive_demux_combine_flows (demux) == GST_FLOW_EOS) {
|
if (gst_adaptive_demux_stream_wait_manifest_update (demux, stream)) {
|
||||||
if (gst_adaptive_demux_has_next_period (demux)) {
|
GST_MANIFEST_UNLOCK (demux);
|
||||||
gst_task_pause (stream->download_task);
|
return;
|
||||||
gst_adaptive_demux_advance_period (demux);
|
}
|
||||||
ret = GST_FLOW_OK;
|
gst_task_pause (stream->download_task);
|
||||||
goto end;
|
} else {
|
||||||
} else if (gst_adaptive_demux_is_live (demux)) {
|
if (gst_adaptive_demux_combine_flows (demux) == GST_FLOW_EOS) {
|
||||||
if (gst_adaptive_demux_stream_wait_manifest_update (demux, stream)) {
|
if (gst_adaptive_demux_has_next_period (demux)) {
|
||||||
GST_MANIFEST_UNLOCK (demux);
|
gst_task_pause (stream->download_task);
|
||||||
return;
|
gst_adaptive_demux_advance_period (demux);
|
||||||
|
ret = GST_FLOW_OK;
|
||||||
|
goto end;
|
||||||
|
} else {
|
||||||
|
gst_task_pause (stream->download_task);
|
||||||
}
|
}
|
||||||
|
|
||||||
gst_task_pause (stream->download_task);
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
gst_task_pause (stream->download_task);
|
ret = GST_FLOW_OK;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user