ff_url_join: Don't add any at-char if the auth is an empty string

Originally committed as revision 23650 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Martin Storsjö
2010-06-19 21:56:50 +00:00
parent 6217b6451a
commit a955fc5ee7
2 changed files with 3 additions and 2 deletions

View File

@ -3601,7 +3601,7 @@ int ff_url_join(char *str, int size, const char *proto,
str[0] = '\0';
if (proto)
av_strlcatf(str, size, "%s://", proto);
if (authorization)
if (authorization && authorization[0])
av_strlcatf(str, size, "%s@", authorization);
#if CONFIG_NETWORK && defined(AF_INET6)
/* Determine if hostname is a numerical IPv6 address,