curlhttpsrc: deadlock in multi-instance scenario
Fixed queue iterator issue and set context state to
GSTCURL_MULTI_LOOP_STATE_RUNNING in case other
instance are in running state.
https://bugzilla.gnome.org/show_bug.cgi?id=793863
diff --git a/ext/curl/gstcurlhttpsrc.c b/ext/curl/gstcurlhttpsrc.c
index a47508e..e60ccf5 100644
--- a/ext/curl/gstcurlhttpsrc.c
+++ b/ext/curl/gstcurlhttpsrc.c
@@ -1668,8 +1668,10 @@
g_mutex_unlock (&qelement->p->buffer_mutex);
gst_curl_http_src_remove_queue_item (&context->queue, qelement->p);
}
+ qelement = qelement->next;
}
context->request_removal_element = NULL;
+ context->state = GSTCURL_MULTI_LOOP_STATE_RUNNING;
g_mutex_unlock (&context->mutex);
} else {
GSTCURL_WARNING_PRINT ("Curl Loop State was invalid or unsupported");