]> git.0d.be Git - empathy.git/commitdiff
Emit error when failing to link audio pad
authorOlivier CrĂȘte <olivier.crete@collabora.co.uk>
Sat, 6 Mar 2010 21:59:51 +0000 (16:59 -0500)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Mon, 29 Mar 2010 15:36:23 +0000 (17:36 +0200)
src/empathy-call-window.c

index 09197bfe1ef3b96955797b405cd186a767327eac..2c2fa62640d2e2d25b5e089e3660c509c64465e9 100644 (file)
@@ -1999,6 +1999,7 @@ empathy_call_window_src_added_cb (EmpathyCallHandler *handler,
 {
   EmpathyCallWindow *self = EMPATHY_CALL_WINDOW (user_data);
   EmpathyCallWindowPriv *priv = GET_PRIV (self);
+  gboolean retval = FALSE;
 
   GstPad *pad;
 
@@ -2025,9 +2026,19 @@ empathy_call_window_src_added_cb (EmpathyCallHandler *handler,
         g_assert_not_reached ();
     }
 
-  gst_pad_link (src, pad);
+  if (!pad)
+    goto out;
+
+  if (GST_PAD_LINK_FAILED (gst_pad_link (src, pad)))
+      g_warning ("Could not link %s sink pad",
+          media_type == TP_MEDIA_STREAM_TYPE_AUDIO ? "audio" : "video");
+  else
+      retval = TRUE;
+
   gst_object_unref (pad);
 
+ out:
+
   g_mutex_unlock (priv->lock);
 
   return TRUE;