]> git.sesse.net Git - cubemap/blobdiff - input.cpp
Do not serialize prebuffering_bytes in StreamProto.
[cubemap] / input.cpp
index 25012a6bbad930f63a53914ed53fd0e9d8cc4fcf..b434eedfe1307cc8bd51dfca83ab38dfda9f4f9b 100644 (file)
--- a/input.cpp
+++ b/input.cpp
@@ -98,25 +98,23 @@ Input *create_input(const string &url, Input::Encoding encoding)
 {
        string protocol, user, host, port, path;
        if (!parse_url(url, &protocol, &user, &host, &port, &path)) {
-               return NULL;
+               return nullptr;
        }
        if (protocol == "http") {
                return new HTTPInput(url, encoding);
        }
        if (protocol == "udp") {
-               if (encoding == Input::INPUT_ENCODING_METACUBE) {
-                       return NULL;
-               }
+               // encoding is ignored; it's never Metacube.
                return new UDPInput(url);
        }
-       return NULL;
+       return nullptr;
 }
 
 Input *create_input(const InputProto &serialized)
 {
        string protocol, user, host, port, path;
        if (!parse_url(serialized.url(), &protocol, &user, &host, &port, &path)) {
-               return NULL;
+               return nullptr;
        }
        if (protocol == "http") {
                return new HTTPInput(serialized);
@@ -124,7 +122,7 @@ Input *create_input(const InputProto &serialized)
        if (protocol == "udp") {
                return new UDPInput(serialized);
        }
-       return NULL;
+       return nullptr;
 }
 
 Input::~Input() {}