diff options
author | Duncan Salerno <duncan.salerno@gmail.com> | 2012-10-06 01:58:48 +0300 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2012-10-09 14:16:32 +0300 |
commit | eea003814cc5afaea546a6d229690350bd7481af (patch) | |
tree | ac904de59c858fd712b48b9a47fc0025cb7ccfb4 | |
parent | a6363e3d89e7a32078d28e7fb77bb5246e2cadee (diff) | |
download | ffmpeg-eea003814cc5afaea546a6d229690350bd7481af.tar.gz |
url: Handle relative urls being just a new query string
Signed-off-by: Martin Storsjö <martin@martin.st>
-rw-r--r-- | libavformat/utils.c | 6 |
1 files changed, 6 insertions, 0 deletions
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) |