mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-25 10:04:19 +00:00
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:
parent
64190e7452
commit
f57370c4db
2 changed files with 2 additions and 2 deletions
|
@ -687,7 +687,7 @@ gst_mf_capture_winrt_set_caps (GstMFSourceObject * object, GstCaps * caps)
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const auto& iter: desc_list) {
|
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_);
|
target_caps = gst_caps_ref (iter.caps_);
|
||||||
self->capture->SetMediaDescription(iter);
|
self->capture->SetMediaDescription(iter);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -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)) {
|
for (iter = self->media_types; iter; iter = g_list_next (iter)) {
|
||||||
GstMFStreamMediaType *minfo = (GstMFStreamMediaType *) iter->data;
|
GstMFStreamMediaType *minfo = (GstMFStreamMediaType *) iter->data;
|
||||||
if (gst_caps_is_subset (minfo->caps, caps)) {
|
if (gst_caps_can_intersect (minfo->caps, caps)) {
|
||||||
best_type = minfo;
|
best_type = minfo;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue