GST_DEBUG_OBJECT (stream,
"Live playlist EOS - waiting for manifest update");
stream->state = GST_ADAPTIVE_DEMUX2_STREAM_STATE_WAITING_MANIFEST_UPDATE;
+ /* Clear the stream last_ret EOS state, since we're not actually EOS */
+ if (stream->last_ret == GST_FLOW_EOS)
+ stream->last_ret = GST_FLOW_OK;
gst_adaptive_demux2_stream_wants_manifest_update (demux);
return;
}
break; /* all is good, let's go */
case GST_FLOW_EOS:
GST_DEBUG_OBJECT (stream, "EOS, checking to stop download loop");
+ stream->last_ret = ret;
gst_adaptive_demux2_stream_handle_playlist_eos (stream);
return FALSE;
case GST_ADAPTIVE_DEMUX_FLOW_LOST_SYNC:
* * Pop next pending data from track and update pending position
*
*/
+ gboolean need_restart = FALSE;
+
for (tmp = demux->priv->outputs; tmp; tmp = tmp->next) {
OutputSlot *slot = (OutputSlot *) tmp->data;
GstAdaptiveDemuxTrack *track = slot->track;
gst_event_store_mark_delivered (&track->sticky_events, event);
gst_event_unref (event);
event = NULL;
+ /* We'll need to re-check if all tracks are empty again above */
+ need_restart = TRUE;
}
}
if (global_output_position != GST_CLOCK_STIME_NONE)
demux->priv->global_output_position = global_output_position;
+ if (need_restart)
+ goto restart;
+
if (global_output_position == GST_CLOCK_STIME_NONE) {
if (!demux->priv->flushing) {
GST_DEBUG_OBJECT (demux,