gdp: Fail gracefully if event can't be parsed

https://bugzilla.gnome.org/show_bug.cgi?id=731093
This commit is contained in:
Olivier Crête 2014-06-02 21:43:56 -04:00
parent db09922842
commit 037f277566

View file

@ -558,6 +558,12 @@ gst_dp_event_from_packet_1_0 (guint header_length, const guint8 * header,
string =
g_strndup ((gchar *) payload, GST_DP_HEADER_PAYLOAD_LENGTH (header));
s = gst_structure_from_string (string, NULL);
if (s == NULL) {
g_free (string);
GST_WARNING ("Could not parse payload string: %s", string);
return NULL;
}
g_free (string);
}
GST_LOG ("Creating event of type 0x%x with structure '%" GST_PTR_FORMAT "'",