camerabin: Do not assert on null caps property

If camerabin receives a null caps as 'filter-caps' argument,
use the default value
This commit is contained in:
Thiago Santos 2010-06-08 08:41:49 -03:00
parent 4fa3e217e2
commit 7806ba95b6

View file

@ -3345,6 +3345,9 @@ gst_camerabin_set_property (GObject * object, guint prop_id,
gst_caps_replace (&camera->view_finder_caps, gst_caps_replace (&camera->view_finder_caps,
(GstCaps *) gst_value_get_caps (value)); (GstCaps *) gst_value_get_caps (value));
GST_OBJECT_UNLOCK (camera); 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); gst_camerabin_configure_format (camera, camera->view_finder_caps);
break; break;
case ARG_PREVIEW_CAPS: case ARG_PREVIEW_CAPS: