* open.cpp : wxWindows plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
- * $Id: open.cpp,v 1.47 2003/12/09 19:15:03 yoann Exp $
+ * $Id: open.cpp,v 1.48 2003/12/10 11:04:25 courmisch Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
switch( i_net_type )
{
case 0:
+ mrltemp = wxT("udp") + demux + wxT("://");
if( i_net_ports[0] !=
config_GetInt( p_intf, "server-port" ) )
{
- mrltemp = wxT("udp") + demux +
- wxString::Format( wxT("://@:%d"),
- i_net_ports[0] );
- }
- else
- {
- mrltemp = wxT("udp") + demux + wxT("://");
+ mrltemp += wxString::Format( wxT("@:%d"), i_net_ports[0] );
}
break;
case 1:
- mrltemp = wxT("udp") + demux + wxT("://@") +
- net_addrs[1]->GetLineText(0);
- if( i_net_ports[1] !=
- config_GetInt( p_intf, "server-port" ) )
+ mrltemp = wxT("udp") + demux + wxT("://@");
+ if ((net_addrs[1]->GetLineText(0).Find (':') != -1)
+ && (net_addrs[1]->GetLineText(0)[0u] != '['))
+ {
+ /* automatically adds '[' and ']' to IPv6 addresses */
+ mrltemp += wxT("[") + net_addrs[1]->GetLineText(0)
+ + wxT("]");
+ }
+ else
+ {
+ mrltemp += net_addrs[1]->GetLineText(0);
+ }
+ if( i_net_ports[1] != config_GetInt( p_intf, "server-port" ) )
{
- mrltemp = mrltemp + wxString::Format( wxT(":%d"),
- i_net_ports[1] );
+ mrltemp += wxString::Format( wxT(":%d"), i_net_ports[1] );
}
break;
* streamout.cpp : wxWindows plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
- * $Id: streamout.cpp,v 1.37 2003/11/27 10:34:51 gbazin Exp $
+ * $Id: streamout.cpp,v 1.38 2003/12/10 11:04:25 courmisch Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
if( !dup_opts.IsEmpty() ) dup_opts += wxT(",");
dup_opts += wxT("dst=std{access=udp,mux=");
dup_opts += encapsulation + wxT(",url=");
- dup_opts += net_addrs[UDP_ACCESS_OUT]->GetLineText(0);
+
+ wxString udp_addr = net_addrs[UDP_ACCESS_OUT]->GetLineText(0);
+ if ((udp_addr[0u] != '[') && (udp_addr.Find(':') != -1))
+ {
+ dup_opts += wxT ("[") + udp_addr + wxT ("]");
+ }
+ else
+ {
+ dup_opts += udp_addr;
+ }
dup_opts += wxString::Format( wxT(":%d"),
net_ports[UDP_ACCESS_OUT]->GetValue() );