camerabin: report an error if we fail to link vfsrc and viewfinder queue
authorMohammed Sameer <msameer@foolab.org>
Tue, 8 Apr 2014 17:54:26 +0000 (20:54 +0300)
committerSebastian Dröge <sebastian@centricular.com>
Wed, 9 Apr 2014 06:54:07 +0000 (08:54 +0200)
https://bugzilla.gnome.org/show_bug.cgi?id=727855

gst/camerabin2/gstcamerabin2.c

index 29618f2299f2bdc6c6dbb7148fa9bc290b96af17..8e0806f1784c4abeefb4cce664019ce20dfa6a0b 100644 (file)
@@ -1749,8 +1749,13 @@ gst_camera_bin_create_elements (GstCameraBin2 * camera)
     camera->src_capture_notify_id = g_signal_connect (G_OBJECT (camera->src),
         "notify::ready-for-capture",
         G_CALLBACK (gst_camera_bin_src_notify_readyforcapture), camera);
-    gst_element_link_pads (camera->src, "vfsrc", camera->viewfinderbin_queue,
-        "sink");
+
+    if (!gst_element_link_pads (camera->src, "vfsrc",
+           camera->viewfinderbin_queue, "sink")) {
+      GST_ERROR_OBJECT (camera,
+          "Failed to link camera source's vfsrc pad to viewfinder queue");
+      goto fail;
+    }
 
     if (!gst_element_link_pads (camera->src, "imgsrc",
             camera->imagebin_capsfilter, "sink")) {