mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
gst: Ensure possible_caps exists before comparing caps
During negotiation, ensure that possible_caps exists before calling gst_caps_intersect_full(). Sometimes possible_caps seem to be NULL which cause the GST_IS_CAPS assert to fail. The reason for the occasional NULL possible_caps during initial negotiation is unknown, but this is also possible during renegotiation. The handle_format_change() may be triggered before the next create(), win which case we have not yet discovered in the streaming thread that we are in the NOT_NEGOTIATED state. We should guard against this possibility as well.
This commit is contained in:
parent
dea6fa7f4c
commit
1cc00923db
1 changed files with 1 additions and 1 deletions
|
|
@ -1064,7 +1064,7 @@ handle_format_change (GstPipeWireSrc *pwsrc,
|
|||
}
|
||||
|
||||
pw_peer_caps = gst_caps_from_format (param);
|
||||
if (pw_peer_caps) {
|
||||
if (pw_peer_caps && pwsrc->possible_caps) {
|
||||
pwsrc->caps = gst_caps_intersect_full (pw_peer_caps,
|
||||
pwsrc->possible_caps,
|
||||
GST_CAPS_INTERSECT_FIRST);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue