From eea003814cc5afaea546a6d229690350bd7481af Mon Sep 17 00:00:00 2001 From: Duncan Salerno Date: Sat, 6 Oct 2012 01:58:48 +0300 Subject: url: Handle relative urls being just a new query string MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin Storsjö --- libavformat/utils.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libavformat/utils.c b/libavformat/utils.c index 1fd0ba3e8e..9d0049a9ad 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -3417,6 +3417,12 @@ void ff_make_absolute_url(char *buf, int size, const char *base, if (path_query != NULL) *path_query = '\0'; + /* Is relative path just a new query part? */ + if (rel[0] == '?') { + av_strlcat(buf, rel, size); + return; + } + /* Remove the file name from the base url */ sep = strrchr(buf, '/'); if (sep) -- cgit v1.2.3