basecamerasrc: Make construct_pipeline optional

Construct pipeline should be optional. Subclasses that don't
have internal elements don't need it.
This commit is contained in:
Thiago Santos 2010-12-09 14:13:13 -03:00
parent ba2368d0bc
commit 80ff930012

View file

@ -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;