From 539db6f68bfd1a276a377fd58988556d6faa0f65 Mon Sep 17 00:00:00 2001 From: Thiago Santos Date: Wed, 22 Apr 2015 13:05:42 -0300 Subject: [PATCH] digitalzoom: prevent assertion when caps is any --- gst/camerabin2/gstdigitalzoom.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gst/camerabin2/gstdigitalzoom.c b/gst/camerabin2/gstdigitalzoom.c index 54019a1f68..1ca508505a 100644 --- a/gst/camerabin2/gstdigitalzoom.c +++ b/gst/camerabin2/gstdigitalzoom.c @@ -76,6 +76,11 @@ gst_digital_zoom_update_crop (GstDigitalZoom * self, GstCaps * caps) gfloat zoom; GstStructure *structure; + if (caps == NULL || gst_caps_is_any (caps)) { + g_object_set (self->capsfilter, "caps", NULL, NULL); + return; + } + structure = gst_caps_get_structure (caps, 0); gst_structure_get (structure, "width", G_TYPE_INT, &width, "height", G_TYPE_INT, &height, NULL);