Commit 59f41e69 authored by Rémi Duraffort's avatar Rémi Duraffort

Fix the previsous commit: if the user or the password is set in the url, use

it.
parent a354b871
......@@ -460,15 +460,15 @@ static int Connect( demux_t *p_demux )
int i_ret = VLC_SUCCESS;
if( p_sys->url.i_port == 0 ) p_sys->url.i_port = 554;
if( p_sys->url.psz_username && p_sys->url.psz_password )
if( p_sys->url.psz_username || p_sys->url.psz_password )
{
int err;
err = asprintf( &psz_url, "rtsp://%s:%d%s", p_sys->url.psz_host,
p_sys->url.i_port, p_sys->url.psz_path );
if( err == -1 ) return VLC_ENOMEM;
psz_user = strdup( p_sys->url.psz_username );
psz_pwd = strdup( p_sys->url.psz_password );
psz_user = strdup( p_sys->url.psz_username ? p_sys->url.psz_username : "" );
psz_pwd = strdup( p_sys->url.psz_password ? p_sys->url.psz_password : "");
}
else
{
......
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