mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-01 22:58:50 -04:00
gst: Sanitize caps before translating
DMABuf caps without concrete formats and modifiers don't map well to the Pipewire negotiation process. Introduce a new gst_caps_sanitize() helper function, where such cases can be handled.
This commit is contained in:
parent
f1b75fc6f8
commit
8a271a87b7
3 changed files with 47 additions and 1 deletions
|
|
@ -844,10 +844,14 @@ gst_pipewire_src_negotiate (GstBaseSrc * basesrc)
|
|||
/* no peer, work with our own caps then */
|
||||
caps = thiscaps;
|
||||
}
|
||||
|
||||
GST_DEBUG_OBJECT (basesrc, "have common caps: %" GST_PTR_FORMAT, caps);
|
||||
gst_caps_sanitize (caps);
|
||||
|
||||
if (caps == NULL || gst_caps_is_empty (caps))
|
||||
goto no_common_caps;
|
||||
|
||||
GST_DEBUG_OBJECT (basesrc, "have common caps: %" GST_PTR_FORMAT, caps);
|
||||
GST_DEBUG_OBJECT (basesrc, "have common caps (sanitized): %" GST_PTR_FORMAT, caps);
|
||||
|
||||
/* open a connection with these caps */
|
||||
possible = gst_caps_to_format_all (caps);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue