rtsp-server: allow binding on port 0 (binds on a random port)
authorAlessandro Decina <alessandro.d@gmail.com>
Fri, 12 Oct 2012 05:08:57 +0000 (07:08 +0200)
committerAlessandro Decina <alessandro.d@gmail.com>
Mon, 15 Oct 2012 08:50:27 +0000 (10:50 +0200)
gst/rtsp-server/rtsp-server.c

index 0219a9d..36c75eb 100644 (file)
@@ -608,7 +608,7 @@ gst_rtsp_server_create_socket (GstRTSPServer * server,
 
   /* resolve the server IP address */
   port = atoi (server->service);
-  if (port != 0)
+  if (port != 0 || !strcmp (server->service, "0"))
     conn = g_network_address_new (server->address, port);
   else
     conn = g_network_service_new (server->service, "tcp", server->address);