]> git.0d.be Git - empathy.git/commitdiff
telepathy-glib sucks, need to send stream error from the main thread
authorOlivier CrĂȘte <olivier.crete@collabora.co.uk>
Sat, 6 Mar 2010 23:31:16 +0000 (18:31 -0500)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Mon, 29 Mar 2010 15:36:24 +0000 (17:36 +0200)
libempathy/empathy-call-handler.c

index 31b66f3f451cbc2672c9afcbc68ddf9e0aaffb5e..3b7ce546c85901a105fb1889368c2b9e103c468f 100644 (file)
@@ -329,6 +329,18 @@ empathy_call_handler_tf_channel_session_created_cb (TfChannel *tfchannel,
     GST_ELEMENT (conference));
 }
 
+static gboolean
+src_pad_added_error_idle (gpointer data)
+{
+  TfStream *stream = data;
+
+  tf_stream_error (stream, TP_MEDIA_STREAM_ERROR_MEDIA_ERROR,
+      "Could not link sink");
+  g_object_unref (stream);
+
+  return FALSE;
+}
+
 static void
 empathy_call_handler_tf_stream_src_pad_added_cb (TfStream *stream,
   GstPad *pad, FsCodec *codec, EmpathyCallHandler  *handler)
@@ -342,8 +354,7 @@ empathy_call_handler_tf_stream_src_pad_added_cb (TfStream *stream,
       pad, media_type, &retval);
 
   if (!retval)
-      tf_stream_error (stream, TP_MEDIA_STREAM_ERROR_MEDIA_ERROR,
-          "Could not link sink");
+    g_idle_add (src_pad_added_error_idle, g_object_ref (stream));
 }