]> git.sesse.net Git - vlc/commitdiff
* modules/access/udp.c, modules/access/rtp.c, modules/misc/network/ipv4.c: only check for
authorGildas Bazin <gbazin@videolan.org>
Mon, 16 Dec 2002 16:48:04 +0000 (16:48 +0000)
committerGildas Bazin <gbazin@videolan.org>
Mon, 16 Dec 2002 16:48:04 +0000 (16:48 +0000)
the "server-port" config variable in the access plugins. access_output plugins will now
pick a port at random, thus allowing sout to work out of the box on a localhost. (thanks
Meuuh)

modules/access/rtp.c
modules/access/udp.c
modules/misc/network/ipv4.c

index 313fcb2deba6a7b3a49ba987eaea5f6a82c84c8c..c138599812961f2832fd8bf6382660cc52073a87 100644 (file)
@@ -2,7 +2,7 @@
  * rtp.c: RTP access plug-in
  *****************************************************************************
  * Copyright (C) 2001, 2002 VideoLAN
- * $Id: rtp.c,v 1.9 2002/12/12 15:10:58 gbazin Exp $
+ * $Id: rtp.c,v 1.10 2002/12/16 16:48:04 gbazin Exp $
  *
  * Authors: Tristan Leteurtre <tooney@via.ecp.fr>
  *
@@ -219,6 +219,11 @@ static int Open( vlc_object_t *p_this )
         }
     }
 
+    if( i_bind_port == 0 )
+    {
+        i_bind_port = config_GetInt( p_this, "server-port" );
+    }
+
     p_input->pf_read = RTPNetworkRead;
     p_input->pf_set_program = input_SetProgram;
     p_input->pf_set_area = NULL;
index 319e6c3bd64341de15f54d6f8d451b6216225056..06e2ff419d50c7049002fef8d5c53efe3681533d 100644 (file)
@@ -2,7 +2,7 @@
  * udp.c: raw UDP access plug-in
  *****************************************************************************
  * Copyright (C) 2001, 2002 VideoLAN
- * $Id: udp.c,v 1.6 2002/12/12 15:10:58 gbazin Exp $
+ * $Id: udp.c,v 1.7 2002/12/16 16:48:04 gbazin Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
@@ -212,6 +212,11 @@ static int Open( vlc_object_t *p_this )
         }
     }
 
+    if( i_bind_port == 0 )
+    {
+        i_bind_port = config_GetInt( p_this, "server-port" );
+    }
+
     p_input->pf_read = Read;
     p_input->pf_set_program = input_SetProgram;
     p_input->pf_set_area = NULL;
index 92cf64ae3736a4ca04ad11ef465afe5666a0623b..96ff9dbfb298173aa2b4bc6a6dfb002564c5ab83 100644 (file)
@@ -2,7 +2,7 @@
  * ipv4.c: IPv4 network abstraction layer
  *****************************************************************************
  * Copyright (C) 2001, 2002 VideoLAN
- * $Id: ipv4.c,v 1.9 2002/12/06 16:34:07 sam Exp $
+ * $Id: ipv4.c,v 1.10 2002/12/16 16:48:04 gbazin Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *          Mathias Kretschmer <mathias@research.att.com>
@@ -148,11 +148,6 @@ static int OpenUDP( vlc_object_t * p_this, network_socket_t * p_socket )
     socklen_t i_opt_size;
     struct sockaddr_in sock;
 
-    if( i_bind_port == 0 )
-    {
-        i_bind_port = config_GetInt( p_this, "server-port" );
-    }
-
     /* Open a SOCK_DGRAM (UDP) socket, in the AF_INET domain, automatic (0)
      * protocol */
     if( (i_handle = socket( AF_INET, SOCK_DGRAM, 0 )) == -1 )