diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2008-10-12 09:55:07 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2008-10-12 09:55:07 +0000 |
| commit | 0a74e1c0e3781afe041ba9acc361461cc3ebda82 (patch) | |
| tree | 1777fedfe870fb11c3df666b83e2cec93775f363 /src/plugins | |
| parent | ae7155e169382587679fd0b0eb85cf9c442501e0 (diff) | |
| download | qmmp-0a74e1c0e3781afe041ba9acc361461cc3ebda82.tar.gz qmmp-0a74e1c0e3781afe041ba9acc361461cc3ebda82.tar.bz2 qmmp-0a74e1c0e3781afe041ba9acc361461cc3ebda82.zip | |
fixed seeking bug
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@580 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins')
| -rw-r--r-- | src/plugins/Input/flac/decoder_flac.cpp | 3 | ||||
| -rw-r--r-- | src/plugins/Input/mad/decoder_mad.cpp | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/Input/flac/decoder_flac.cpp b/src/plugins/Input/flac/decoder_flac.cpp index 3f2935d6e..5bb2b6219 100644 --- a/src/plugins/Input/flac/decoder_flac.cpp +++ b/src/plugins/Input/flac/decoder_flac.cpp @@ -440,7 +440,8 @@ qint64 DecoderFLAC::lengthInSeconds() void DecoderFLAC::seek(qint64 pos) { - seekTime = pos; + if (totalTime > 0) + seekTime = pos; } diff --git a/src/plugins/Input/mad/decoder_mad.cpp b/src/plugins/Input/mad/decoder_mad.cpp index 74b7c124a..0eab8cfaa 100644 --- a/src/plugins/Input/mad/decoder_mad.cpp +++ b/src/plugins/Input/mad/decoder_mad.cpp @@ -408,7 +408,7 @@ void DecoderMAD::run() { mutex()->lock(); - if (seekTime >= 0.0) + if (seekTime >= 0.0 && totalTime > 0) { long seek_pos = long(seekTime * input()->size() / totalTime); input()->seek(seek_pos); |
