demux: adaptive: fixup AnyURI
[vlc.git] / 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 );