Commit aa2f3524 authored by Gildas Bazin's avatar Gildas Bazin

* modules/access/udp.c, modules/access/rtp.c, modules/misc/network/ipv4.c: only check for
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)
parent e4429e9b
......@@ -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;
......
......@@ -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;
......
......@@ -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 )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment