rtpbasedepayload: Check if the packet loss event actually has timestamp and duration...
authorSebastian Dröge <sebastian@centricular.com>
Mon, 14 Dec 2015 12:11:21 +0000 (13:11 +0100)
committerSebastian Dröge <sebastian@centricular.com>
Mon, 14 Dec 2015 12:11:21 +0000 (13:11 +0100)
CID 1139615

gst-libs/gst/rtp/gstrtpbasedepayload.c

index 0eb8b89..8a313af 100644 (file)
@@ -864,8 +864,12 @@ gst_rtp_base_depayload_packet_lost (GstRTPBaseDepayload * filter,
   timestamp = -1;
   duration = -1;
 
-  gst_structure_get_clock_time (s, "timestamp", &timestamp);
-  gst_structure_get_clock_time (s, "duration", &duration);
+  if (!gst_structure_get_clock_time (s, "timestamp", &timestamp) ||
+      !gst_structure_get_clock_time (s, "duration", &duration)) {
+    GST_ERROR_OBJECT (filter,
+        "Packet loss event without timestamp or duration");
+    return FALSE;
+  }
 
   /* send GAP event */
   sevent = gst_event_new_gap (timestamp, duration);