Do not crash on invalid src= URLs.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Fri, 16 Aug 2013 15:43:53 +0000 (17:43 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Fri, 16 Aug 2013 15:43:53 +0000 (17:43 +0200)
main.cpp

index c40b78f..cf728ca 100644 (file)
--- a/main.cpp
+++ b/main.cpp
@@ -177,9 +177,10 @@ void create_streams(const Config &config,
                string src = stream_config.src;
                if (!src.empty()) {
                        multimap<string, InputWithRefcount>::iterator input_it = inputs->find(src);
-                       assert(input_it != inputs->end());
-                       input_it->second.input->add_destination(stream_index);
-                       ++input_it->second.refcount;
+                       if (input_it != inputs->end()) {
+                               input_it->second.input->add_destination(stream_index);
+                               ++input_it->second.refcount;
+                       }
                }
        }