rtpmux: protect against NULL caps
authorHavard Graff <havard.graff@gmail.com>
Wed, 4 May 2016 09:48:04 +0000 (11:48 +0200)
committerOlivier CrĂȘte <olivier.crete@collabora.com>
Wed, 10 Oct 2018 19:35:31 +0000 (15:35 -0400)
Due to state-changes deactivating the pad from another thread,
this can happen.

https://bugzilla.gnome.org/show_bug.cgi?id=795162

gst/rtpmanager/gstrtpmux.c

index b79a5cf..1841b97 100644 (file)
@@ -602,6 +602,9 @@ gst_rtp_mux_setcaps (GstPad * pad, GstRTPMux * rtp_mux, GstCaps * caps)
   GstRTPMuxPadPrivate *padpriv;
   GstCaps *peercaps;
 
+  if (caps == NULL)
+    return FALSE;
+
   if (!gst_caps_is_fixed (caps))
     return FALSE;