# HG changeset patch # User mstorsjo # Date 1276984610 0 # Node ID 3877522243ec4c865f7e48bc388e80a4a209ab33 # Parent 9f9a4be98cfb9ff89fbd5f6646e5e487cd1e1293 ff_url_join: Don't add any at-char if the auth is an empty string diff -r 9f9a4be98cfb -r 3877522243ec internal.h --- a/internal.h Sat Jun 19 21:46:39 2010 +0000 +++ b/internal.h Sat Jun 19 21:56:50 2010 +0000 @@ -131,7 +131,8 @@ * @param size the size of the str buffer * @param proto the protocol identifier, if null, the separator * after the identifier is left out, too - * @param authorization an optional authorization string, may be null + * @param authorization an optional authorization string, may be null. + * An empty string is treated the same as a null string. * @param hostname the host name string * @param port the port number, left out from the string if negative * @param fmt a generic format string for everything to add after the diff -r 9f9a4be98cfb -r 3877522243ec utils.c --- a/utils.c Sat Jun 19 21:46:39 2010 +0000 +++ b/utils.c Sat Jun 19 21:56:50 2010 +0000 @@ -3601,7 +3601,7 @@ 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,