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

VLCThumbnailer: Unregister events once we know the playback has started

parent 800285a4
......@@ -139,11 +139,13 @@ parser::Task::Status VLCThumbnailer::run( parser::Task& task )
parser::Task::Status VLCThumbnailer::startPlayback( VLC::MediaPlayer &mp )
mp.eventManager().onPlaying([this]() {
// Use a copy of the event manager to automatically unregister all events as soon
// as we leave this method.
auto em = mp.eventManager();
em.onPlaying([this]() {
mp.eventManager().onEncounteredError([this]() {
em.onEncounteredError([this]() {
std::unique_lock<std::mutex> lock( m_mutex );
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