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: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1619
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2384>
This commit is contained in:
Seungha Yang 2021-07-08 19:03:06 +09:00
parent 64190e7452
commit f57370c4db
2 changed files with 2 additions and 2 deletions

View file

@ -687,7 +687,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;

View file

@ -693,7 +693,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;
}