aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/Effect/crossfade
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2010-10-21 18:11:39 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2010-10-21 18:11:39 +0000
commite9fc2477f22033c7b5314c00cd8b8b6eb6e7d0ac (patch)
tree5e2e3c26c28c7bb1b9e32a552b32689ad147e210 /src/plugins/Effect/crossfade
parent07b5999701908598ef1ce868c060723a3a2b2d44 (diff)
downloadqmmp-e9fc2477f22033c7b5314c00cd8b8b6eb6e7d0ac.tar.gz
qmmp-e9fc2477f22033c7b5314c00cd8b8b6eb6e7d0ac.tar.bz2
qmmp-e9fc2477f22033c7b5314c00cd8b8b6eb6e7d0ac.zip
fixed problem with http/mms streams and crossfade plugin (thanks to Algirdas Butkus)
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@1950 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/Effect/crossfade')
-rw-r--r--src/plugins/Effect/crossfade/crossfadeplugin.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/Effect/crossfade/crossfadeplugin.cpp b/src/plugins/Effect/crossfade/crossfadeplugin.cpp
index a50df9b2b..df653999d 100644
--- a/src/plugins/Effect/crossfade/crossfadeplugin.cpp
+++ b/src/plugins/Effect/crossfade/crossfadeplugin.cpp
@@ -47,7 +47,8 @@ void CrossfadePlugin::applyEffect(Buffer *b)
switch (m_state)
{
case WAITING:
- if(m_core->totalTime() - m_handler->elapsed() < m_overlap + 2000)
+ if((m_core->totalTime() > m_overlap + 2000)
+ && (m_core->totalTime() - m_handler->elapsed() < m_overlap + 2000))
{
StateHandler::instance()->sendNextTrackRequest();
m_state = CHECKING;
@@ -60,7 +61,7 @@ void CrossfadePlugin::applyEffect(Buffer *b)
else
return;
case PREPARING:
- if(m_core->totalTime() - m_handler->elapsed() < m_overlap)
+ if(m_core->totalTime() && (m_core->totalTime() - m_handler->elapsed() < m_overlap))
{
if(m_buffer_at + b->nbytes > m_buffer_size)
{