[FFmpeg-cvslog] r23650 - in trunk/libavformat: internal.h utils.c
mstorsjo
subversion
Sat Jun 19 23:56:50 CEST 2010
Author: mstorsjo
Date: Sat Jun 19 23:56:50 2010
New Revision: 23650
Log:
ff_url_join: Don't add any at-char if the auth is an empty string
Modified:
trunk/libavformat/internal.h
trunk/libavformat/utils.c
Modified: trunk/libavformat/internal.h
==============================================================================
--- trunk/libavformat/internal.h Sat Jun 19 23:46:39 2010 (r23649)
+++ trunk/libavformat/internal.h Sat Jun 19 23:56:50 2010 (r23650)
@@ -131,7 +131,8 @@ void ff_url_split(char *proto, int proto
* @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
Modified: trunk/libavformat/utils.c
==============================================================================
--- trunk/libavformat/utils.c Sat Jun 19 23:46:39 2010 (r23649)
+++ trunk/libavformat/utils.c Sat Jun 19 23:56:50 2010 (r23650)
@@ -3601,7 +3601,7 @@ int ff_url_join(char *str, int size, con
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,
More information about the ffmpeg-cvslog
mailing list