mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 10:11:08 +00:00
decklinkaudiosrc: Ignore channel-mask when checking set_caps compatibility
channel-mask doesn't matter in decklinkaudiosrc, and differences in it can cause caps negotiations to fail without a real reason. https://bugzilla.gnome.org/show_bug.cgi?id=773313
This commit is contained in:
parent
9a2df5dc3b
commit
ab991db7ed
1 changed files with 12 additions and 2 deletions
|
@ -278,14 +278,24 @@ gst_decklink_audio_src_set_caps (GstBaseSrc * bsrc, GstCaps * caps)
|
|||
GST_DEBUG_OBJECT (self, "Setting caps %" GST_PTR_FORMAT, caps);
|
||||
|
||||
if ((current_caps = gst_pad_get_current_caps (GST_BASE_SRC_PAD (bsrc)))) {
|
||||
GstCaps *curcaps_cp;
|
||||
GstStructure *cur_st, *caps_st;
|
||||
|
||||
GST_DEBUG_OBJECT (self, "Pad already has caps %" GST_PTR_FORMAT, caps);
|
||||
|
||||
if (!gst_caps_is_equal (caps, current_caps)) {
|
||||
GST_ERROR_OBJECT (self, "New caps are not equal to old caps");
|
||||
curcaps_cp = gst_caps_make_writable (current_caps);
|
||||
cur_st = gst_caps_get_structure (curcaps_cp, 0);
|
||||
caps_st = gst_caps_get_structure (caps, 0);
|
||||
gst_structure_remove_field (cur_st, "channel-mask");
|
||||
|
||||
if (!gst_structure_can_intersect (caps_st, cur_st)) {
|
||||
GST_ERROR_OBJECT (self, "New caps are not compatible with old caps");
|
||||
gst_caps_unref (current_caps);
|
||||
gst_caps_unref (curcaps_cp);
|
||||
return FALSE;
|
||||
} else {
|
||||
gst_caps_unref (current_caps);
|
||||
gst_caps_unref (curcaps_cp);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue