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")) {