gdp: Fail gracefully if event can't be parsed
https://bugzilla.gnome.org/show_bug.cgi?id=731093
This commit is contained in:
parent
db09922842
commit
037f277566
@ -558,6 +558,12 @@ gst_dp_event_from_packet_1_0 (guint header_length, const guint8 * header,
|
|||||||
string =
|
string =
|
||||||
g_strndup ((gchar *) payload, GST_DP_HEADER_PAYLOAD_LENGTH (header));
|
g_strndup ((gchar *) payload, GST_DP_HEADER_PAYLOAD_LENGTH (header));
|
||||||
s = gst_structure_from_string (string, NULL);
|
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);
|
g_free (string);
|
||||||
}
|
}
|
||||||
GST_LOG ("Creating event of type 0x%x with structure '%" GST_PTR_FORMAT "'",
|
GST_LOG ("Creating event of type 0x%x with structure '%" GST_PTR_FORMAT "'",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user