diff --git a/src/client/videomanager.cpp b/src/client/videomanager.cpp
index 69aa47a0bee8079b341c18cd3f526e33c966ed0e..a6ef30ed63c0615d5be2f0fb93ad21627dd93653 100644
--- a/src/client/videomanager.cpp
+++ b/src/client/videomanager.cpp
@@ -699,6 +699,7 @@ std::shared_ptr<video::VideoInput>
 getVideoInput(const std::string& id, video::VideoInputMode inputMode)
 {
     auto& vmgr = Manager::instance().getVideoManager();
+    std::lock_guard<std::mutex> lk(vmgr.videoMutex);
     auto it = vmgr.videoInputs.find(id);
     if (it != vmgr.videoInputs.end()) {
         if (auto input = it->second.lock()) {
diff --git a/src/client/videomanager.h b/src/client/videomanager.h
index 34767eefdd408293e66b0ae93494ff3d52dbfd94..c910baba10a8ad089319c10f4ce9d05ff66d4cb5 100644
--- a/src/client/videomanager.h
+++ b/src/client/videomanager.h
@@ -56,6 +56,7 @@ public:
     std::map<std::string, std::weak_ptr<AudioInput>, std::less<>> audioInputs;
     std::map<std::string, std::weak_ptr<video::VideoInput>, std::less<>> videoInputs;
     std::mutex audioMutex;
+    std::mutex videoMutex;
     bool hasRunningPlayers();
     std::shared_ptr<video::VideoInput> getVideoInput(std::string_view id) const
     {