Commit b9c92e35 authored by Seungha Yang's avatar Seungha Yang 🐑 Committed by Tim-Philipp Müller
Browse files

mfvideosrc: Fix negotiation when interlace-mode is specified

Given caps does not need to be strictly subset of device caps.
Allow accept it if device caps and requested caps can intersect

Fixes: gstreamer/gst-plugins-bad#1619
Part-of: <gstreamer/gst-plugins-bad!2391>
parent 5a4d1de5
......@@ -609,7 +609,7 @@ gst_mf_capture_winrt_set_caps (GstMFSourceObject * object, GstCaps * caps)
}
for (const auto& iter: desc_list) {
if (gst_caps_is_subset (iter.caps_, caps)) {
if (gst_caps_can_intersect (iter.caps_, caps)) {
target_caps = gst_caps_ref (iter.caps_);
self->capture->SetMediaDescription(iter);
break;
......
......@@ -603,7 +603,7 @@ gst_mf_source_reader_set_caps (GstMFSourceObject * object, GstCaps * caps)
for (iter = self->media_types; iter; iter = g_list_next (iter)) {
GstMFStreamMediaType *minfo = (GstMFStreamMediaType *) iter->data;
if (gst_caps_is_subset (minfo->caps, caps)) {
if (gst_caps_can_intersect (minfo->caps, caps)) {
best_type = minfo;
break;
}
......
Supports Markdown
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