mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
gst/src: fix crash when current_caps is NULL
gst_pad_get_current_caps may return NULL and passing that into
gst_caps_is_equal may result in fatal critical log due to the
"g_return_val_if_fail (GST_IS_CAPS (caps1)" check. Fix by checking for
NULL to avoid this.
(cherry picked from commit 95127d8a18)
This commit is contained in:
parent
6ce298ffde
commit
3c450008d5
1 changed files with 1 additions and 1 deletions
|
|
@ -860,7 +860,7 @@ gst_pipewire_src_negotiate (GstBaseSrc * basesrc)
|
|||
current_caps = gst_pad_get_current_caps (GST_BASE_SRC_PAD (pwsrc));
|
||||
preferred_new_caps = gst_caps_copy_nth (possible_caps, 0);
|
||||
|
||||
if (gst_caps_is_equal (current_caps, preferred_new_caps)) {
|
||||
if (current_caps && gst_caps_is_equal (current_caps, preferred_new_caps)) {
|
||||
GST_DEBUG_OBJECT (pwsrc,
|
||||
"Stream running and new caps equal current ones. "
|
||||
"Skipping renegotiation.");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue