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 b79a5cffb16b0008bfaa740fd1c69db9ea70b295..1841b97e93b5242305ac1aaa238d8339a2c1b57a 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;