From 80f03b4d15c13d510dab9c9f7f28b590dbe81147 Mon Sep 17 00:00:00 2001 From: Seungha Yang Date: Thu, 7 Dec 2017 11:02:02 +0900 Subject: [PATCH] srt: Post error message for NULL host ... instead of crash without any information https://bugzilla.gnome.org/show_bug.cgi?id=791329 --- ext/srt/gstsrt.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ext/srt/gstsrt.c b/ext/srt/gstsrt.c index 6ddccd4549..39ccfdf154 100644 --- a/ext/srt/gstsrt.c +++ b/ext/srt/gstsrt.c @@ -44,6 +44,12 @@ gst_srt_client_connect_full (GstElement * elem, int sender, gpointer sa; size_t sa_len; + if (host == NULL) { + GST_ELEMENT_ERROR (elem, RESOURCE, OPEN_READ, ("Invalid host"), + ("Unspecified NULL host")); + goto failed; + } + *socket_address = g_inet_socket_address_new_from_string (host, port); if (*socket_address == NULL) {