Commit 79b5886d authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

VLCMediaPlayer: Fix error events processing.

Also this will avoid to flood the event callback for totally unrelated
events... It could also have caused a crash if the callback expected a
string value for instance.
parent 967bfbd5
......@@ -97,13 +97,13 @@ MediaPlayer::checkForWaitedEvents(const libvlc_event_t *event)
{
QMutexLocker lock( &m_mutex );
// Use the user provided callback to check if this event suits him.
// This is intented to filter out some events, such as multiple length changed
// with a value of 0
if ( m_eventsCallback != NULL && m_eventsCallback( this, event ) == false )
return ;
if ( m_eventsExpected.contains( event->type ) == true )
{
// Use the user provided callback to check if this event suits him.
// This is intented to filter out some events, such as multiple length changed
// with a value of 0
if ( m_eventsCallback != NULL && m_eventsCallback( this, event ) == false )
return ;
m_eventReceived = event->type;
m_waitCond.wakeAll();
}
......
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