aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2011-05-08 09:40:58 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2011-05-08 09:40:58 +0000
commite60aa7316f2e464756ae53aa557dae1de3db1224 (patch)
treeb1cf85662e4d06c6e521a647126129789b78d223 /src
parent67cc84bdd339f12e1390a8ecdd2142602c9fdf8e (diff)
downloadqmmp-e60aa7316f2e464756ae53aa557dae1de3db1224.tar.gz
qmmp-e60aa7316f2e464756ae53aa557dae1de3db1224.tar.bz2
qmmp-e60aa7316f2e464756ae53aa557dae1de3db1224.zip
fixed frozen while cycling through deleted files in playlist (Closes
issue 459) git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@2179 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src')
-rw-r--r--src/qmmpui/mediaplayer.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/qmmpui/mediaplayer.cpp b/src/qmmpui/mediaplayer.cpp
index 21051c7fe..652436197 100644
--- a/src/qmmpui/mediaplayer.cpp
+++ b/src/qmmpui/mediaplayer.cpp
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2008-2010 by Ilya Kotov *
+ * Copyright (C) 2008-2011 by Ilya Kotov *
* forkotov02@hotmail.ru *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -25,7 +25,7 @@
#include "playlistitem.h"
#include "mediaplayer.h"
-#define MAX_SKIPS 5
+#define MAX_ERRORS 4
MediaPlayer *MediaPlayer::m_instance = 0;
@@ -104,7 +104,6 @@ void MediaPlayer::play(qint64 offset)
return;
}
m_core->play(s, false, offset);
- m_skips = 0;
}
void MediaPlayer::stop()
@@ -217,16 +216,18 @@ void MediaPlayer::processState(Qmmp::State state)
{
case Qmmp::NormalError:
stop();
- if (m_skips < MAX_SKIPS)
+ if (m_skips <= MAX_ERRORS)
{
- playNext();
m_skips++;
+ playNext();
}
break;
case Qmmp::FatalError:
stop();
break;
- default:
+ case Qmmp::Playing:
m_skips = 0;
+ default:
+ ;
}
}