From 80ff9300121b94787e80f19532abe0564f947025 Mon Sep 17 00:00:00 2001 From: Thiago Santos Date: Thu, 9 Dec 2010 14:13:13 -0300 Subject: [PATCH] basecamerasrc: Make construct_pipeline optional Construct pipeline should be optional. Subclasses that don't have internal elements don't need it. --- gst/camerabin2/gstbasecamerasrc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gst/camerabin2/gstbasecamerasrc.c b/gst/camerabin2/gstbasecamerasrc.c index 07487d8..f0d4e00 100644 --- a/gst/camerabin2/gstbasecamerasrc.c +++ b/gst/camerabin2/gstbasecamerasrc.c @@ -390,11 +390,11 @@ construct_pipeline (GstBaseCameraSrc * self) { GstBaseCameraSrcClass *bclass = GST_BASE_CAMERA_SRC_GET_CLASS (self); - g_return_val_if_fail (bclass->construct_pipeline, FALSE); - - if (!bclass->construct_pipeline (self)) { - GST_ERROR_OBJECT (self, "pipeline construction failed"); - return FALSE; + if (bclass->construct_pipeline) { + if (!bclass->construct_pipeline (self)) { + GST_ERROR_OBJECT (self, "pipeline construction failed"); + return FALSE; + } } return TRUE; -- 2.7.4