#define DEFAULT_BITRATE_LIMIT 0.8
#define DOWNLOAD_RATE_MAX_HISTORY_LENGTH 5
+#define MAX_DOWNLOAD_ERROR_COUNT 3
enum
{
break;
}
+ stream->download_error_count = 0;
+
if (buffer) {
gst_mss_stream_advance_fragment (stream->manifest_stream);
}
error:
{
GST_WARNING_OBJECT (mssdemux, "Error while pushing fragment");
- gst_task_pause (stream->download_task);
+ if (++stream->download_error_count >= DOWNLOAD_RATE_MAX_HISTORY_LENGTH) {
+ GST_ELEMENT_ERROR (mssdemux, RESOURCE, NOT_FOUND,
+ (_("Couldn't download fragments")),
+ ("fragment downloading has failed too much consecutive times"));
+ }
return;
}
}