]> git.sesse.net Git - vlc/commitdiff
httplive: support absolute URI-locations for key-retrieval
authorIlkka Ollakka <ileoo@videolan.org>
Sun, 17 Mar 2013 11:26:33 +0000 (13:26 +0200)
committerIlkka Ollakka <ileoo@videolan.org>
Sun, 17 Mar 2013 11:29:12 +0000 (13:29 +0200)
modules/stream_filter/httplive.c

index d6ee0a9450280da0b51e54071d4255c7790ebed4..1e3973306690ea81677d2fe3e6d27878fbcbd45b 100644 (file)
@@ -775,7 +775,13 @@ static int parse_Key(stream_t *s, hls_stream_t *hls, char *p_read)
             if (end != NULL)
                 *end = 0;
         }
-        hls->psz_current_key_path = relative_URI(hls->url, uri);
+        /* For absolute URI, just duplicate it
+         * don't limit to HTTP, maybe some sanity checking
+         * should be done more in here? */
+        if( strstr( uri , "://" ) )
+            hls->psz_current_key_path = strdup( uri );
+        else
+            hls->psz_current_key_path = relative_URI(hls->url, uri);
         free(value);
 
         value = iv = parse_Attributes(p_read, "IV");