mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
playbin: use subset check instead of intersect
Elements usually require that all fields on their caps are present on the fixed caps they receive. Using intersection won't verify it, resort to using is_subset() checks. https://bugzilla.gnome.org/show_bug.cgi?id=760477
This commit is contained in:
parent
1b412a523d
commit
81c52aaa16
1 changed files with 4 additions and 4 deletions
|
@ -4451,7 +4451,7 @@ autoplug_continue_cb (GstElement * element, GstPad * pad, GstCaps * caps,
|
||||||
|
|
||||||
sinkcaps = gst_pad_query_caps (sinkpad, NULL);
|
sinkcaps = gst_pad_query_caps (sinkpad, NULL);
|
||||||
if (!gst_caps_is_any (sinkcaps))
|
if (!gst_caps_is_any (sinkcaps))
|
||||||
ret = !gst_caps_can_intersect (sinkcaps, caps);
|
ret = !gst_caps_is_subset (caps, sinkcaps);
|
||||||
gst_caps_unref (sinkcaps);
|
gst_caps_unref (sinkcaps);
|
||||||
gst_object_unref (sinkpad);
|
gst_object_unref (sinkpad);
|
||||||
}
|
}
|
||||||
|
@ -4482,7 +4482,7 @@ autoplug_continue_cb (GstElement * element, GstPad * pad, GstCaps * caps,
|
||||||
|
|
||||||
sinkcaps = gst_pad_query_caps (sinkpad, NULL);
|
sinkcaps = gst_pad_query_caps (sinkpad, NULL);
|
||||||
if (!gst_caps_is_any (sinkcaps))
|
if (!gst_caps_is_any (sinkcaps))
|
||||||
ret = !gst_caps_can_intersect (sinkcaps, caps);
|
ret = !gst_caps_is_subset (caps, sinkcaps);
|
||||||
gst_caps_unref (sinkcaps);
|
gst_caps_unref (sinkcaps);
|
||||||
gst_object_unref (sinkpad);
|
gst_object_unref (sinkpad);
|
||||||
}
|
}
|
||||||
|
@ -4500,7 +4500,7 @@ autoplug_continue_cb (GstElement * element, GstPad * pad, GstCaps * caps,
|
||||||
|
|
||||||
sinkcaps = gst_pad_query_caps (sinkpad, NULL);
|
sinkcaps = gst_pad_query_caps (sinkpad, NULL);
|
||||||
if (!gst_caps_is_any (sinkcaps))
|
if (!gst_caps_is_any (sinkcaps))
|
||||||
ret = !gst_caps_can_intersect (sinkcaps, caps);
|
ret = !gst_caps_is_subset (caps, sinkcaps);
|
||||||
gst_caps_unref (sinkcaps);
|
gst_caps_unref (sinkcaps);
|
||||||
gst_object_unref (sinkpad);
|
gst_object_unref (sinkpad);
|
||||||
}
|
}
|
||||||
|
@ -4530,7 +4530,7 @@ sink_accepts_caps (GstPlayBin * playbin, GstElement * sink, GstCaps * caps)
|
||||||
sinkcaps = gst_pad_query_caps (sinkpad, NULL);
|
sinkcaps = gst_pad_query_caps (sinkpad, NULL);
|
||||||
/* Got the sink pad, now let's see if the element actually does accept the
|
/* Got the sink pad, now let's see if the element actually does accept the
|
||||||
* caps that we have */
|
* caps that we have */
|
||||||
ret = gst_caps_can_intersect (sinkcaps, caps);
|
ret = gst_caps_is_subset (caps, sinkcaps);
|
||||||
gst_caps_unref (sinkcaps);
|
gst_caps_unref (sinkcaps);
|
||||||
gst_object_unref (sinkpad);
|
gst_object_unref (sinkpad);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue