[FFmpeg-cvslog] url: Handle relative urls being just a new query string

Duncan Salerno git at videolan.org
Wed Oct 10 13:05:19 CEST 2012


ffmpeg | branch: master | Duncan Salerno <duncan.salerno at gmail.com> | Sat Oct  6 01:58:48 2012 +0300| [eea003814cc5afaea546a6d229690350bd7481af] | committer: Martin Storsjö

url: Handle relative urls being just a new query string

Signed-off-by: Martin Storsjö <martin at martin.st>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=eea003814cc5afaea546a6d229690350bd7481af
---

 libavformat/utils.c |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/libavformat/utils.c b/libavformat/utils.c
index 1fd0ba3..9d0049a 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)



More information about the ffmpeg-cvslog mailing list