Revision 105ba7dc libavformat/applehttp.c

View differences:

libavformat/applehttp.c
90 90
                              const char *rel)
91 91
{
92 92
    char *sep;
93
    /* Absolute path, relative to the current server */
94
    if (base && strstr(base, "://") && rel[0] == '/') {
95
        if (base != buf)
96
            av_strlcpy(buf, base, size);
97
        sep = strstr(buf, "://");
98
        if (sep) {
99
            sep += 3;
100
            sep = strchr(sep, '/');
101
            if (sep)
102
                *sep = '\0';
103
        }
104
        av_strlcat(buf, rel, size);
105
        return;
106
    }
93 107
    /* If rel actually is an absolute url, just copy it */
94 108
    if (!base || strstr(rel, "://") || rel[0] == '/') {
95 109
        av_strlcpy(buf, rel, size);

Also available in: Unified diff