demux: adaptive: fix local file playback regression
authorFrancois Cartegnie <fcvlcdev@free.fr>
Wed, 6 Jul 2016 18:54:01 +0000 (20:54 +0200)
committerFrancois Cartegnie <fcvlcdev@free.fr>
Sat, 9 Jul 2016 11:10:55 +0000 (13:10 +0200)
modules/demux/adaptive/http/ConnectionParams.cpp

index 98c21b7..1df660d 100644 (file)
@@ -64,7 +64,14 @@ void ConnectionParams::setPath(const std::string &path_)
 
     std::ostringstream os;
     os.imbue(std::locale("C"));
-    os << scheme << "://" << hostname << ":" << port;
+    os << scheme << "://";
+    if(!hostname.empty())
+    {
+        os << hostname;
+        if( (port != 80 && scheme != "http") ||
+            (port != 443 && scheme != "https") )
+            os << ":" << port;
+    }
     os << path;
     uri = os.str();
 }