diff options
author | Olivier CrĂȘte <olivier.crete@collabora.com> | 2014-06-02 21:43:56 -0400 |
---|---|---|
committer | Olivier CrĂȘte <olivier.crete@collabora.com> | 2014-06-02 21:44:00 -0400 |
commit | 037f27756618b919056756c25d9f38ff1243c55b (patch) | |
tree | 4f80372aa557c947863d93dfced43c4b605f88a5 /gst/gdp | |
parent | db0992284298c7f644841df2f91a1e9ad277230b (diff) | |
download | gstreamer-plugins-bad-037f27756618b919056756c25d9f38ff1243c55b.tar.gz |
gdp: Fail gracefully if event can't be parsed
https://bugzilla.gnome.org/show_bug.cgi?id=731093
Diffstat (limited to 'gst/gdp')
-rw-r--r-- | gst/gdp/dataprotocol.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gst/gdp/dataprotocol.c b/gst/gdp/dataprotocol.c index 41fdeb43e..420cdffd7 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 "'", |