From 81c52aaa1695cd1d0ca9004aa668b9ed85db2da9 Mon Sep 17 00:00:00 2001 From: Thiago Santos Date: Tue, 12 Jan 2016 11:31:50 -0300 Subject: 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 --- gst/playback/gstplaybin2.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'gst') diff --git a/gst/playback/gstplaybin2.c b/gst/playback/gstplaybin2.c index 2ef24687c..e3e79d396 100644 --- a/gst/playback/gstplaybin2.c +++ b/gst/playback/gstplaybin2.c @@ -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); } -- cgit v1.2.1