From e9fc2477f22033c7b5314c00cd8b8b6eb6e7d0ac Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Thu, 21 Oct 2010 18:11:39 +0000 Subject: 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 --- src/plugins/Effect/crossfade/crossfadeplugin.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') 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) { -- cgit v1.2.3-13-gbd6f