From 037f27756618b919056756c25d9f38ff1243c55b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20Cr=C3=AAte?= Date: Mon, 2 Jun 2014 21:43:56 -0400 Subject: [PATCH] gdp: Fail gracefully if event can't be parsed https://bugzilla.gnome.org/show_bug.cgi?id=731093 --- gst/gdp/dataprotocol.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gst/gdp/dataprotocol.c b/gst/gdp/dataprotocol.c index 41fdeb43e8..420cdffd7e 100644 --- a/gst/gdp/dataprotocol.c +++ b/gst/gdp/dataprotocol.c @@ -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 "'",