oldrc: Accept backward compatible hosts

Fix #19871
This commit is contained in:
Hugo Beauzée-Luyssen 2018-02-28 14:49:43 +01:00
parent a996a926fa
commit 8c1c9a4322
1 changed files with 13 additions and 0 deletions

View File

@ -304,6 +304,19 @@ static int Activate( vlc_object_t *p_this )
vlc_url_t url;
vlc_UrlParse( &url, psz_host );
if( url.psz_host == NULL )
{
vlc_UrlClean( &url );
char *psz_backward_compat_host;
if( asprintf( &psz_backward_compat_host, "//%s", psz_host ) < 0 )
{
free( psz_host );
return VLC_EGENERIC;
}
free( psz_host );
psz_host = psz_backward_compat_host;
vlc_UrlParse( &url, psz_host );
}
msg_Dbg( p_intf, "base: %s, port: %d", url.psz_host, url.i_port );