aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/qmmp/soundcore.cpp7
-rw-r--r--src/qmmp/statehandler.cpp8
2 files changed, 7 insertions, 8 deletions
diff --git a/src/qmmp/soundcore.cpp b/src/qmmp/soundcore.cpp
index 8b528f916..d099a3dff 100644
--- a/src/qmmp/soundcore.cpp
+++ b/src/qmmp/soundcore.cpp
@@ -282,8 +282,14 @@ void SoundCore::startNextEngine()
{
case NO_ENGINE:
case SAME_ENGINE:
+ {
+ if(m_sources.isEmpty())
+ m_nextState = NO_ENGINE;
break;
+ }
case ANOTHER_ENGINE:
+ {
+ m_nextState = NO_ENGINE;
if(m_engine)
{
m_engine->deleteLater();
@@ -295,6 +301,7 @@ void SoundCore::startNextEngine()
startNextSource();
}
break;
+ }
case INVALID_SOURCE:
m_handler->dispatch(Qmmp::NormalError);
}
diff --git a/src/qmmp/statehandler.cpp b/src/qmmp/statehandler.cpp
index aaaeee2d3..0c2e6dc3d 100644
--- a/src/qmmp/statehandler.cpp
+++ b/src/qmmp/statehandler.cpp
@@ -151,14 +151,6 @@ void StateHandler::dispatch(Qmmp::State state)
Qmmp::State prevState = state;
m_state = state;
qApp->postEvent(parent(), new StateChangedEvent(m_state, prevState));
-
- /*if(m_state == Qmmp::Playing && !m_cachedMetaData.isEmpty())
- {
- m_mutex.unlock();
- dispatch(m_cachedMetaData);
- m_mutex.lock();
- m_cachedMetaData.clear();
- }*/
}
m_mutex.unlock();
}