rtpbasedepayload: Check if the packet loss event actually has timestamp and duration fields

CID 1139615
This commit is contained in:
Sebastian Dröge 2015-12-14 13:11:21 +01:00
parent f5a3f70571
commit d6be67265f

View file

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