mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-09 07:52:36 +00:00
digitalzoom: prevent assertion when caps is any
This commit is contained in:
parent
3a70cf5667
commit
539db6f68b
1 changed files with 5 additions and 0 deletions
|
@ -76,6 +76,11 @@ gst_digital_zoom_update_crop (GstDigitalZoom * self, GstCaps * caps)
|
||||||
gfloat zoom;
|
gfloat zoom;
|
||||||
GstStructure *structure;
|
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);
|
structure = gst_caps_get_structure (caps, 0);
|
||||||
gst_structure_get (structure, "width", G_TYPE_INT, &width, "height",
|
gst_structure_get (structure, "width", G_TYPE_INT, &width, "height",
|
||||||
G_TYPE_INT, &height, NULL);
|
G_TYPE_INT, &height, NULL);
|
||||||
|
|
Loading…
Reference in a new issue