camerabin: Do not assert on null caps property
authorThiago Santos <thiago.sousa.santos@collabora.co.uk>
Tue, 8 Jun 2010 11:41:49 +0000 (08:41 -0300)
committerThiago Santos <thiago.sousa.santos@collabora.co.uk>
Tue, 8 Jun 2010 11:41:49 +0000 (08:41 -0300)
If camerabin receives a null caps as 'filter-caps' argument,
use the default value

gst/camerabin/gstcamerabin.c

index eb59422382631e5accff851a5c7cd37a691d7b1d..7630d181f54a83289d1b0e657f3a49f2f1868d1e 100644 (file)
@@ -3345,6 +3345,9 @@ gst_camerabin_set_property (GObject * object, guint prop_id,
       gst_caps_replace (&camera->view_finder_caps,
           (GstCaps *) gst_value_get_caps (value));
       GST_OBJECT_UNLOCK (camera);
+      if (!camera->view_finder_caps)
+        camera->view_finder_caps =
+            gst_caps_from_string (CAMERABIN_DEFAULT_VF_CAPS);
       gst_camerabin_configure_format (camera, camera->view_finder_caps);
       break;
     case ARG_PREVIEW_CAPS: