srt: Fix listener crash if no URI is specified
authorNicolas Dufresne <nicolas.dufresne@collabora.com>
Sat, 6 Jul 2019 20:15:40 +0000 (16:15 -0400)
committerOlivier CrĂȘte <olivier.crete@collabora.com>
Mon, 8 Jul 2019 17:52:48 +0000 (13:52 -0400)
ext/srt/gstsrtobject.c

index 98e2851da47d3db35d3d773d12f884f8dc454a1d..e90676961e14396d8009b3e21bfa84cab20c46f8 100644 (file)
@@ -724,6 +724,8 @@ gst_srt_object_wait_connect (GstSRTObject * srtobject,
 
   local_address =
       gst_structure_get_string (srtobject->parameters, "localaddress");
+  if (local_address == NULL)
+    local_address = GST_SRT_DEFAULT_LOCALADDRESS;
 
   bind_addr = g_inet_socket_address_new_from_string (local_address, local_port);
   bind_sa_len = g_socket_address_get_native_size (bind_addr);