Commit 2e3dee03 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Real RTSP: discard unsupported legacy username and password syntax

This is better than leaking them to the DNS resolver. This also avoids
confusing error messages if live555 is missing or failing.
parent 35f29374
...@@ -156,6 +156,13 @@ static int Open( vlc_object_t *p_this ) ...@@ -156,6 +156,13 @@ static int Open( vlc_object_t *p_this )
return VLC_EGENERIC; return VLC_EGENERIC;
} }
/* Discard legacy username/password syntax - not supported */
const char *psz_location = strchr( p_access->psz_location, '@' );
if( psz_location != NULL )
psz_location++;
else
psz_location = p_access->psz_location;
p_access->pf_read = NULL; p_access->pf_read = NULL;
p_access->pf_block = BlockRead; p_access->pf_block = BlockRead;
p_access->pf_seek = Seek; p_access->pf_seek = Seek;
...@@ -180,10 +187,10 @@ static int Open( vlc_object_t *p_this ) ...@@ -180,10 +187,10 @@ static int Open( vlc_object_t *p_this )
p_sys->p_rtsp->pf_read_line = RtspReadLine; p_sys->p_rtsp->pf_read_line = RtspReadLine;
p_sys->p_rtsp->pf_write = RtspWrite; p_sys->p_rtsp->pf_write = RtspWrite;
i_result = rtsp_connect( p_sys->p_rtsp, p_access->psz_location, 0 ); i_result = rtsp_connect( p_sys->p_rtsp, psz_location, 0 );
if( i_result ) if( i_result )
{ {
msg_Dbg( p_access, "could not connect to: %s", p_access->psz_location ); msg_Dbg( p_access, "could not connect to: %s", psz_location );
free( p_sys->p_rtsp ); free( p_sys->p_rtsp );
p_sys->p_rtsp = NULL; p_sys->p_rtsp = NULL;
goto error; goto error;
......
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