+ Input *input = NULL;
+ if (deserialized_inputs.count(stream_id) != 0) {
+ input = deserialized_inputs[stream_id];
+ if (input->get_url() != src) {
+ fprintf(stderr, "INFO: Stream '%s' has changed URL from '%s' to '%s', restarting input.\n",
+ stream_id.c_str(), input->get_url().c_str(), src.c_str());
+ delete input;
+ input = NULL;
+ }
+ deserialized_inputs.erase(stream_id);
+ }
+ if (input == NULL) {
+ input = new Input(stream_id, src);
+ }