diff --git a/src/rtmp_manager.cpp b/src/rtmp_manager.cpp index 816f2a1..27fdf36 100644 --- a/src/rtmp_manager.cpp +++ b/src/rtmp_manager.cpp @@ -196,7 +196,7 @@ void RTMPManager::start_camera(const Camera &cam, StreamType type) ctx.running = true; ctx.thread = std::thread([cam, type]() { stream_loop(cam, type); }); - streams[key] = std::move(ctx); + streams.emplace(key, std::move(ctx)); } void RTMPManager::stop_camera(const std::string &cam_name, StreamType type)