mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-11 00:24:12 +02:00
* Fixed AudioEngine crashing when GStreamer goes to its weird Paused state.
This commit is contained in:
@@ -734,8 +734,14 @@ AudioEngine::onStateChanged( Phonon::State newState, Phonon::State oldState )
|
||||
{
|
||||
case Phonon::PausedState:
|
||||
{
|
||||
qint64 duration = m_mediaObject->totalTime() > 0 ? m_mediaObject->totalTime() : m_currentTrack->duration() * 1000;
|
||||
stopped = ( duration - 1000 < m_mediaObject->currentTime() );
|
||||
if ( m_mediaObject && m_currentTrack )
|
||||
{
|
||||
qint64 duration = m_mediaObject->totalTime() > 0 ? m_mediaObject->totalTime() : m_currentTrack->duration() * 1000;
|
||||
stopped = ( duration - 1000 < m_mediaObject->currentTime() );
|
||||
}
|
||||
else
|
||||
stopped = true;
|
||||
|
||||
if ( !stopped )
|
||||
setState( Paused );
|
||||
|
||||
|
Reference in New Issue
Block a user