]> git.sesse.net Git - cubemap/blobdiff - input.cpp
Release Cubemap 1.4.1.
[cubemap] / input.cpp
index 25012a6bbad930f63a53914ed53fd0e9d8cc4fcf..dba6cf38b26b3ca87a6a953c8842600012e0124b 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;
-               }
+               assert(encoding == Input::INPUT_ENCODING_RAW);
                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() {}