X-Git-Url: https://git.sesse.net/?p=cubemap;a=blobdiff_plain;f=input.cpp;h=d37b7d997e16f41f5afbe6d4421e5d669ad4d516;hp=7c776e124f0cfa2627b20a4760964ad9f4af246a;hb=f8e6be4ca4d53ca6dbb9a56063c7dfca9b6760c9;hpb=93bcb482a3f433504aa794441ea4a69aede345ff diff --git a/input.cpp b/input.cpp index 7c776e1..d37b7d9 100644 --- a/input.cpp +++ b/input.cpp @@ -49,21 +49,21 @@ bool parse_url(const string &url, string *protocol, string *host, string *port, // http://foo/bar *port = *protocol; - *path = rest; + *path = "/" + rest; return true; } -Input *create_input(const std::string &stream_id, const std::string &url) +Input *create_input(const std::string &url) { string protocol, host, port, path; if (!parse_url(url, &protocol, &host, &port, &path)) { return NULL; } if (protocol == "http") { - return new HTTPInput(stream_id, url); + return new HTTPInput(url); } if (protocol == "udp") { - return new UDPInput(stream_id, url); + return new UDPInput(url); } return NULL; }