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
This commit is contained in:
Jun Xie 2018-02-27 10:51:07 +08:00 committed by Nicolas Dufresne
parent e496f398ec
commit cb1b143b5b

View file

@ -1668,8 +1668,10 @@ gst_curl_http_src_curl_multi_loop (gpointer thread_data)
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");