rtph265depay: fix crash with empty sprops-parameters
authorTim-Philipp Müller <tim@centricular.com>
Fri, 16 Jun 2017 10:18:16 +0000 (11:18 +0100)
committerTim-Philipp Müller <tim@centricular.com>
Thu, 23 Nov 2017 08:36:15 +0000 (09:36 +0100)
https://bugzilla.gnome.org/show_bug.cgi?id=780040

gst/rtp/gstrtph265depay.c

index c6545c0..47a137d 100644 (file)
@@ -842,6 +842,10 @@ gst_rtp_h265_depay_setcaps (GstRTPBaseDepayload * depayload, GstCaps * caps)
       gint state = 0;
 
       nal_len = strlen (params[i]);
+      if (nal_len == 0) {
+        GST_WARNING_OBJECT (depayload, "empty param '%s' (#%d)", params[i], i);
+        continue;
+      }
       nal = gst_buffer_new_and_alloc (nal_len);
       gst_buffer_map (nal, &nalmap, GST_MAP_READWRITE);