add_integer( SOUT_CFG_PREFIX "port-video", 1232, NULL, PORT_VIDEO_TEXT,
PORT_VIDEO_LONGTEXT, VLC_TRUE );
- add_integer( SOUT_CFG_PREFIX "ttl", 1, NULL, TTL_TEXT,
+ add_integer( SOUT_CFG_PREFIX "ttl", 0, NULL, TTL_TEXT,
TTL_LONGTEXT, VLC_TRUE );
set_callbacks( Open, Close );
RTP packets need to get the correct src IP address */
if( net_AddressIsMulticast( (vlc_object_t *)p_stream, p_sys->psz_destination ) )
{
- snprintf( psz_ttl, sizeof( psz_ttl ), "/%d", p_sys->i_ttl );
+ snprintf( psz_ttl, sizeof( psz_ttl ), "/%d", p_sys->i_ttl ?
+ p_sys->i_ttl : config_GetInt( p_sout, "ttl" ) );
psz_ttl[sizeof( psz_ttl ) - 1] = '\0';
}
else
const char *psz_destination, vlc_bool_t b_rtsp )
{
sout_stream_sys_t *p_sys = p_stream->p_sys;
+ sout_instance_t *p_sout = p_stream->p_sout;
int i_size;
char *psz_sdp, *p, ipv;
int i;
if( net_AddressIsMulticast( (vlc_object_t *)p_stream, psz_destination ) )
{
/* Add the ttl if it is a multicast address */
- p += sprintf( p, "/%d\r\n", p_sys->i_ttl );
+ p += sprintf( p, "/%d\r\n", p_sys->i_ttl ? p_sys->i_ttl :
+ config_GetInt( p_sout, "ttl" ) );
}
else
{
{
sout_stream_id_t *id = (sout_stream_id_t*)p_args;
sout_stream_t *p_stream = id->p_stream;
+ sout_instance_t *p_sout = p_stream->p_sout;
sout_stream_sys_t *p_sys = p_stream->p_sys;
char *psz_session = NULL;
}
httpd_MsgAdd( answer, "Transport",
"RTP/AVP/UDP;destination=%s;port=%d-%d;ttl=%d",
- id->psz_destination, id->i_port,id->i_port+1, p_sys->i_ttl );
+ id->psz_destination, id->i_port,id->i_port+1,
+ p_sys->i_ttl ? p_sys->i_ttl :
+ config_GetInt( p_sout, "ttl" ) );
}
else if( strstr( psz_transport, "unicast" ) && strstr( psz_transport, "client_port=" ) )
{