diff --git a/gst/autodetect/gstautoaudiosink.c b/gst/autodetect/gstautoaudiosink.c index 7d7975c3db..189698c89a 100644 --- a/gst/autodetect/gstautoaudiosink.c +++ b/gst/autodetect/gstautoaudiosink.c @@ -243,7 +243,7 @@ gst_auto_audio_sink_find_best (GstAutoAudioSink * sink) GSList *errors = NULL; GstBus *bus = gst_bus_new (); GstPad *el_pad = NULL; - GstCaps *el_caps = NULL, *intersect = NULL; + GstCaps *el_caps = NULL; gboolean no_match = TRUE; list = gst_registry_feature_filter (gst_registry_get_default (), @@ -273,10 +273,8 @@ gst_auto_audio_sink_find_best (GstAutoAudioSink * sink) GST_DEBUG_OBJECT (sink, "Checking caps: %" GST_PTR_FORMAT " vs. %" GST_PTR_FORMAT, sink->filter_caps, el_caps); - intersect = gst_caps_intersect (sink->filter_caps, el_caps); - no_match = gst_caps_is_empty (intersect); + no_match = !gst_caps_can_intersect (sink->filter_caps, el_caps); gst_caps_unref (el_caps); - gst_caps_unref (intersect); if (no_match) { GST_DEBUG_OBJECT (sink, "Incompatible caps"); diff --git a/gst/autodetect/gstautoaudiosrc.c b/gst/autodetect/gstautoaudiosrc.c index 076f6ff439..203857bcb4 100644 --- a/gst/autodetect/gstautoaudiosrc.c +++ b/gst/autodetect/gstautoaudiosrc.c @@ -244,7 +244,7 @@ gst_auto_audio_src_find_best (GstAutoAudioSrc * src) GSList *errors = NULL; GstBus *bus = gst_bus_new (); GstPad *el_pad = NULL; - GstCaps *el_caps = NULL, *intersect = NULL; + GstCaps *el_caps = NULL; gboolean no_match = TRUE; list = gst_registry_feature_filter (gst_registry_get_default (), @@ -274,10 +274,8 @@ gst_auto_audio_src_find_best (GstAutoAudioSrc * src) GST_DEBUG_OBJECT (src, "Checking caps: %" GST_PTR_FORMAT " vs. %" GST_PTR_FORMAT, src->filter_caps, el_caps); - intersect = gst_caps_intersect (src->filter_caps, el_caps); - no_match = gst_caps_is_empty (intersect); + no_match = !gst_caps_can_intersect (src->filter_caps, el_caps); gst_caps_unref (el_caps); - gst_caps_unref (intersect); if (no_match) { GST_DEBUG_OBJECT (src, "Incompatible caps"); diff --git a/gst/autodetect/gstautovideosink.c b/gst/autodetect/gstautovideosink.c index d0292fd5ce..3f32ec8945 100644 --- a/gst/autodetect/gstautovideosink.c +++ b/gst/autodetect/gstautovideosink.c @@ -243,7 +243,7 @@ gst_auto_video_sink_find_best (GstAutoVideoSink * sink) GSList *errors = NULL; GstBus *bus = gst_bus_new (); GstPad *el_pad = NULL; - GstCaps *el_caps = NULL, *intersect = NULL; + GstCaps *el_caps = NULL; gboolean no_match = TRUE; list = gst_registry_feature_filter (gst_registry_get_default (), @@ -270,10 +270,8 @@ gst_auto_video_sink_find_best (GstAutoVideoSink * sink) GST_DEBUG_OBJECT (sink, "Checking caps: %" GST_PTR_FORMAT " vs. %" GST_PTR_FORMAT, sink->filter_caps, el_caps); - intersect = gst_caps_intersect (sink->filter_caps, el_caps); - no_match = gst_caps_is_empty (intersect); + no_match = !gst_caps_can_intersect (sink->filter_caps, el_caps); gst_caps_unref (el_caps); - gst_caps_unref (intersect); if (no_match) { GST_DEBUG_OBJECT (sink, "Incompatible caps"); diff --git a/gst/autodetect/gstautovideosrc.c b/gst/autodetect/gstautovideosrc.c index 3fa19c69e1..94c8411bd2 100644 --- a/gst/autodetect/gstautovideosrc.c +++ b/gst/autodetect/gstautovideosrc.c @@ -244,7 +244,7 @@ gst_auto_video_src_find_best (GstAutoVideoSrc * src) GSList *errors = NULL; GstBus *bus = gst_bus_new (); GstPad *el_pad = NULL; - GstCaps *el_caps = NULL, *intersect = NULL; + GstCaps *el_caps = NULL; gboolean no_match = TRUE; list = gst_registry_feature_filter (gst_registry_get_default (), @@ -271,10 +271,8 @@ gst_auto_video_src_find_best (GstAutoVideoSrc * src) GST_DEBUG_OBJECT (src, "Checking caps: %" GST_PTR_FORMAT " vs. %" GST_PTR_FORMAT, src->filter_caps, el_caps); - intersect = gst_caps_intersect (src->filter_caps, el_caps); - no_match = gst_caps_is_empty (intersect); + no_match = !gst_caps_can_intersect (src->filter_caps, el_caps); gst_caps_unref (el_caps); - gst_caps_unref (intersect); if (no_match) { GST_DEBUG_OBJECT (src, "Incompatible caps");