mirror of
https://gitlab.freedesktop.org/pipewire/pipewire
synced 2024-07-21 02:05:38 +00: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.
This commit is contained in:
parent
c534acac46
commit
95127d8a18
|
@ -871,7 +871,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…
Reference in a new issue