Skip to content

Commit 4cc4017

Browse files
committed
Fix improper lock.
1 parent 1791384 commit 4cc4017

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

SerialPrograms/Source/CommonFramework/VideoPipeline/VideoOverlaySession.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ void VideoOverlaySession::stats_thread(){
7373
while (!m_stopping){
7474
{
7575
std::vector<OverlayStatSnapshot> lines;
76-
ReadSpinLock lg0(m_lock);
76+
WriteSpinLock lg0(m_lock);
7777
for (const auto& stat : m_stats_order){
7878
OverlayStatSnapshot snapshot = stat->get_current();
7979
if (!snapshot.text.empty()){
@@ -274,7 +274,7 @@ void VideoOverlaySession::clear_log(){
274274
std::vector<OverlayLogLine> VideoOverlaySession::log_texts() const{
275275
ReadSpinLock lg(m_lock);
276276
std::vector<OverlayLogLine> ret;
277-
for(const auto& item : m_log_texts){
277+
for (const auto& item : m_log_texts){
278278
ret.emplace_back(item);
279279
}
280280
return ret;

0 commit comments

Comments
 (0)