From d6be67265f590ee4258cfdaf7e7d42256a985f4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 14 Dec 2015 13:11:21 +0100 Subject: [PATCH] rtpbasedepayload: Check if the packet loss event actually has timestamp and duration fields CID 1139615 --- gst-libs/gst/rtp/gstrtpbasedepayload.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gst-libs/gst/rtp/gstrtpbasedepayload.c b/gst-libs/gst/rtp/gstrtpbasedepayload.c index 0eb8b89bf9..8a313af273 100644 --- a/gst-libs/gst/rtp/gstrtpbasedepayload.c +++ b/gst-libs/gst/rtp/gstrtpbasedepayload.c @@ -864,8 +864,12 @@ gst_rtp_base_depayload_packet_lost (GstRTPBaseDepayload * filter, timestamp = -1; duration = -1; - gst_structure_get_clock_time (s, "timestamp", ×tamp); - gst_structure_get_clock_time (s, "duration", &duration); + if (!gst_structure_get_clock_time (s, "timestamp", ×tamp) || + !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);