Commit b93d7f70 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen
Browse files

VLCThumbnailer: Fix inverted logic.

While this was working fine, it was actually not waiting for a proper
success signaling. This was clearly a race condition, as was
jeopardizing our error/timeout detection
parent f75f8de2
...@@ -227,7 +227,7 @@ bool VLCThumbnailer::takeSnapshot(std::shared_ptr<Media> file, VLC::MediaPlayer ...@@ -227,7 +227,7 @@ bool VLCThumbnailer::takeSnapshot(std::shared_ptr<Media> file, VLC::MediaPlayer
m_snapshotRequired = true; m_snapshotRequired = true;
bool success = m_cond.wait_for( lock, std::chrono::seconds( 3 ), [this]() { bool success = m_cond.wait_for( lock, std::chrono::seconds( 3 ), [this]() {
// Keep waiting if the vmem thread hasn't restored m_snapshotRequired to false // Keep waiting if the vmem thread hasn't restored m_snapshotRequired to false
return m_snapshotRequired == true; return m_snapshotRequired == false;
}); });
if ( success == false ) if ( success == false )
{ {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment