Commit 81c52aaa authored by Thiago Santos's avatar Thiago Santos
Browse files

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
parent 1b412a52
......@@ -4451,7 +4451,7 @@ autoplug_continue_cb (GstElement * element, GstPad * pad, GstCaps * caps,
sinkcaps = gst_pad_query_caps (sinkpad, NULL);
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_object_unref (sinkpad);
}
......@@ -4482,7 +4482,7 @@ autoplug_continue_cb (GstElement * element, GstPad * pad, GstCaps * caps,
sinkcaps = gst_pad_query_caps (sinkpad, NULL);
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_object_unref (sinkpad);
}
......@@ -4500,7 +4500,7 @@ autoplug_continue_cb (GstElement * element, GstPad * pad, GstCaps * caps,
sinkcaps = gst_pad_query_caps (sinkpad, NULL);
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_object_unref (sinkpad);
}
......@@ -4530,7 +4530,7 @@ sink_accepts_caps (GstPlayBin * playbin, GstElement * sink, GstCaps * caps)
sinkcaps = gst_pad_query_caps (sinkpad, NULL);
/* Got the sink pad, now let's see if the element actually does accept the
* caps that we have */
ret = gst_caps_can_intersect (sinkcaps, caps);
ret = gst_caps_is_subset (caps, sinkcaps);
gst_caps_unref (sinkcaps);
gst_object_unref (sinkpad);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment