autoconvert: Use gst_caps_can_intersect()
This commit is contained in:
parent
5e5092e92c
commit
8c371e5c35
@ -707,8 +707,8 @@ factory_can_intersect (GstAutoConvert * autoconvert,
|
|||||||
GstStaticPadTemplate *template = (GstStaticPadTemplate *) templates->data;
|
GstStaticPadTemplate *template = (GstStaticPadTemplate *) templates->data;
|
||||||
|
|
||||||
if (template->direction == direction) {
|
if (template->direction == direction) {
|
||||||
GstCaps *intersect = NULL;
|
|
||||||
GstCaps *tmpl_caps = NULL;
|
GstCaps *tmpl_caps = NULL;
|
||||||
|
gboolean intersect;
|
||||||
|
|
||||||
/* If there is more than one pad in this direction, we return FALSE
|
/* If there is more than one pad in this direction, we return FALSE
|
||||||
* Only transform elements (with one sink and one source pad)
|
* Only transform elements (with one sink and one source pad)
|
||||||
@ -723,18 +723,14 @@ factory_can_intersect (GstAutoConvert * autoconvert,
|
|||||||
has_direction = TRUE;
|
has_direction = TRUE;
|
||||||
|
|
||||||
tmpl_caps = gst_static_caps_get (&template->static_caps);
|
tmpl_caps = gst_static_caps_get (&template->static_caps);
|
||||||
intersect = gst_caps_intersect (tmpl_caps, caps);
|
intersect = gst_caps_can_intersect (tmpl_caps, caps);
|
||||||
GST_DEBUG_OBJECT (autoconvert, "Intersection of factory %" GST_PTR_FORMAT
|
GST_DEBUG_OBJECT (autoconvert, "Factories %" GST_PTR_FORMAT
|
||||||
" static caps %" GST_PTR_FORMAT " and caps %" GST_PTR_FORMAT
|
" static caps %" GST_PTR_FORMAT " and caps %" GST_PTR_FORMAT
|
||||||
" is %" GST_PTR_FORMAT, factory, tmpl_caps, caps, intersect);
|
" can%s intersect", factory, tmpl_caps, caps,
|
||||||
|
intersect ? "" : " not");
|
||||||
gst_caps_unref (tmpl_caps);
|
gst_caps_unref (tmpl_caps);
|
||||||
|
|
||||||
if (intersect) {
|
ret |= intersect;
|
||||||
if (!gst_caps_is_empty (intersect))
|
|
||||||
ret = TRUE;
|
|
||||||
|
|
||||||
gst_caps_unref (intersect);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
templates = g_list_next (templates);
|
templates = g_list_next (templates);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user