srt: Post error message for NULL host

... instead of crash without any information

https://bugzilla.gnome.org/show_bug.cgi?id=791329
This commit is contained in:
Seungha Yang 2017-12-07 11:02:02 +09:00 committed by Olivier Crête
parent c04aba241e
commit 80f03b4d15

View file

@ -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) {