demux: adaptive: fixup AnyURI
authorFrancois Cartegnie <fcvlcdev@free.fr>
Wed, 20 May 2020 15:02:53 +0000 (17:02 +0200)
committerFrancois Cartegnie <fcvlcdev@free.fr>
Fri, 22 May 2020 08:08:29 +0000 (10:08 +0200)
modules/demux/adaptive/playlist/Url.cpp

index bd20701..86385b1 100644 (file)
@@ -125,7 +125,10 @@ std::string Url::toString(size_t index, const BaseRepresentation *rep) const
             ret = part;
         else
         {
-            char *psz_resolved = vlc_uri_resolve( ret.c_str(), part.c_str() );
+            char *psz_fixup = vlc_uri_fixup( part.c_str() );
+            char *psz_resolved = vlc_uri_resolve( ret.c_str(),
+                                                  psz_fixup ? psz_fixup : part.c_str() );
+            free(psz_fixup);
             if( psz_resolved )
             {
                 ret = std::string( psz_resolved );