[empathy] Emit error when failing to link audio pad



commit 6f2876c2a265e4dbd968113795ec222dec86d008
Author: Olivier Crête <olivier crete collabora co uk>
Date:   Sat Mar 6 16:59:51 2010 -0500

    Emit error when failing to link audio pad

 src/empathy-call-window.c |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)
---
diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c
index 09197bf..2c2fa62 100644
--- a/src/empathy-call-window.c
+++ b/src/empathy-call-window.c
@@ -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;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]