_soup_session_add_feature_by_type (session->session,
_soup_cookie_jar_get_type ());
- if (src->session_is_shared) {
- GstContext *context;
- GstMessage *message;
- GstStructure *s;
-
- GST_DEBUG_OBJECT (session, "Sharing session %p", session->session);
-
- context = gst_context_new (GST_SOUP_SESSION_CONTEXT, TRUE);
- s = gst_context_writable_structure (context);
- gst_structure_set (s, "session", GST_TYPE_SOUP_SESSION, session, NULL);
-
- /* during this time the src is locked by the parent thread,
- * which is waiting, so this is safe to do
- */
- GST_OBJECT_UNLOCK (src);
- gst_element_set_context (GST_ELEMENT_CAST (src), context);
- message = gst_message_new_have_context (GST_OBJECT_CAST (src), context);
- gst_element_post_message (GST_ELEMENT_CAST (src), message);
- GST_OBJECT_LOCK (src);
- }
-
/* soup2: connect the authenticate handler for the src that spawned the
* session (i.e. the first owner); other users of this session will connect
* their own after fetching the external session; the callback will handle
GST_OBJECT_UNLOCK (src);
+ if (src->session_is_shared) {
+ GstContext *context;
+ GstMessage *message;
+ GstStructure *s;
+
+ GST_DEBUG_OBJECT (src->session, "Sharing session %p", src->session);
+
+ context = gst_context_new (GST_SOUP_SESSION_CONTEXT, TRUE);
+ s = gst_context_writable_structure (context);
+ gst_structure_set (s, "session", GST_TYPE_SOUP_SESSION, src->session, NULL);
+
+ gst_element_set_context (GST_ELEMENT_CAST (src), context);
+ message = gst_message_new_have_context (GST_OBJECT_CAST (src), context);
+ gst_element_post_message (GST_ELEMENT_CAST (src), message);
+ }
+
return TRUE;
err: