Skip to content

Commit

Permalink
Merge pull request #1384 from stream-labs/fix-memory-manager-shutdown…
Browse files Browse the repository at this point in the history
…-source-crash

Fix memory manager source crash on shutdown
  • Loading branch information
summeroff authored Dec 21, 2023
2 parents c82c8fe + 9bb8f96 commit 2f1e5bb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion obs-studio-server/source/memory-manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ void MemoryManager::registerSource(obs_source_t *source)
std::unique_lock ulock(mtx);

source_info *si = new source_info;
si->source = source;
si->source = obs_source_get_ref(source);
sources.emplace(obs_source_get_name(source), si);
updateSource(source, false);
}
Expand Down Expand Up @@ -345,6 +345,7 @@ void MemoryManager::unregisterSource(obs_source_t *source)

std::lock(mtx, moved_ptr->mtx);
removeCachedMemory(*moved_ptr, true, source_name);
obs_source_release(moved_ptr->source);
moved_ptr->mtx.unlock();
mtx.unlock();
}
Expand Down

0 comments on commit 2f1e5bb

Please sign in to comment.