aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2009-07-20 09:21:15 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2009-07-20 09:21:15 +0000
commita0eb50860d307629165cc74020a33dd528595c16 (patch)
tree019a3d8604b8da4de288e10ba087be9324610825 /src
parent7cfd365a457fe6bf7e9981f521cc51a64bfee66d (diff)
downloadqmmp-a0eb50860d307629165cc74020a33dd528595c16.tar.gz
qmmp-a0eb50860d307629165cc74020a33dd528595c16.tar.bz2
qmmp-a0eb50860d307629165cc74020a33dd528595c16.zip
fixed regression
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@1050 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src')
-rw-r--r--src/plugins/Input/flac/decoder_flac.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/plugins/Input/flac/decoder_flac.cpp b/src/plugins/Input/flac/decoder_flac.cpp
index a79e17b34..fa92ed722 100644
--- a/src/plugins/Input/flac/decoder_flac.cpp
+++ b/src/plugins/Input/flac/decoder_flac.cpp
@@ -324,6 +324,8 @@ bool DecoderFLAC::initialize()
m_nextUrl.clear();
if(track <= m_cue_parser->count() - 1)
m_nextUrl = m_cue_parser->info(track + 1)->path();
+ m_totalTime = m_cue_parser->length(track);
+ setFragment(m_cue_parser->offset(track), m_cue_parser->length(track));
}
else
{
@@ -389,15 +391,11 @@ bool DecoderFLAC::initialize()
configure(data()->sample_rate, data()->channels, 32);
else
configure(data()->sample_rate, data()->channels, data()->bits_per_sample);
- m_totalTime = data()->length;
+ if(!m_cue_parser)
+ m_totalTime = data()->length;
inited = TRUE;
- if (m_length)
- {
- m_totalTime = m_length;
- setFragment(m_offset, m_length);
- }
qDebug("DecoderFLAC: initialize succes");
return TRUE;
}
@@ -456,6 +454,7 @@ void DecoderFLAC::processFinish()
//update current fragment
mutex()->lock();
setFragment(m_cue_parser->offset(track), m_cue_parser->length(track));
+ m_totalTime = m_cue_parser->length(track);
output()->seek(0); //reset time counter
mutex()->unlock();
// find next track