mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
Revert "Revert "pad: Check for subsets, not non-empty intersections to check if caps are compatible""
This reverts commit 2bfada5581
.
Conflicts:
gst/gstpad.c
For 0.11 we want to enforce that only subsets of the pad
caps are allowed. This breaks backward compatibility for
some elements, which is why we only print a warning in
0.10.
This commit is contained in:
parent
97560eb9cb
commit
7476186217
1 changed files with 2 additions and 22 deletions
24
gst/gstpad.c
24
gst/gstpad.c
|
@ -2542,7 +2542,7 @@ gst_pad_acceptcaps_default (GstPad * pad, GstCaps * caps)
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (pad, "allowed caps %" GST_PTR_FORMAT, allowed);
|
GST_DEBUG_OBJECT (pad, "allowed caps %" GST_PTR_FORMAT, allowed);
|
||||||
|
|
||||||
result = gst_caps_can_intersect (allowed, caps);
|
result = gst_caps_is_subset (caps, allowed);
|
||||||
|
|
||||||
gst_caps_unref (allowed);
|
gst_caps_unref (allowed);
|
||||||
|
|
||||||
|
@ -2601,26 +2601,6 @@ gst_pad_accept_caps (GstPad * pad, GstCaps * caps)
|
||||||
result = acceptfunc (pad, caps);
|
result = acceptfunc (pad, caps);
|
||||||
GST_DEBUG_OBJECT (pad, "acceptfunc returned %d", result);
|
GST_DEBUG_OBJECT (pad, "acceptfunc returned %d", result);
|
||||||
|
|
||||||
#ifndef G_DISABLE_ASSERT
|
|
||||||
{
|
|
||||||
GstCaps *padcaps;
|
|
||||||
|
|
||||||
padcaps = gst_pad_get_caps_reffed (pad);
|
|
||||||
if (!gst_caps_is_subset (caps, padcaps)) {
|
|
||||||
gchar *padcaps_str, *caps_str;
|
|
||||||
|
|
||||||
padcaps_str = gst_caps_to_string (padcaps);
|
|
||||||
caps_str = gst_caps_to_string (caps);
|
|
||||||
g_warning ("pad %s:%s accepted caps %s although "
|
|
||||||
"they are not a subset of its caps %s",
|
|
||||||
GST_DEBUG_PAD_NAME (pad), caps_str, padcaps_str);
|
|
||||||
g_free (padcaps_str);
|
|
||||||
g_free (caps_str);
|
|
||||||
}
|
|
||||||
gst_caps_unref (padcaps);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
|
@ -2731,7 +2711,7 @@ do_event_function (GstPad * pad, GstEvent * event,
|
||||||
|
|
||||||
/* See if pad accepts the caps */
|
/* See if pad accepts the caps */
|
||||||
templ = gst_pad_get_pad_template_caps (pad);
|
templ = gst_pad_get_pad_template_caps (pad);
|
||||||
if (!gst_caps_can_intersect (caps, templ))
|
if (!gst_caps_is_subset (caps, templ))
|
||||||
goto not_accepted;
|
goto not_accepted;
|
||||||
|
|
||||||
/* check if it changed */
|
/* check if it changed */
|
||||||
|
|
Loading…
Reference in a new issue