aboutsummaryrefslogtreecommitdiffstats
path: root/src/decode.c
diff options
context:
space:
mode:
authorWarren Dukes <warren.dukes@gmail.com>2004-03-18 22:20:26 +0000
committerWarren Dukes <warren.dukes@gmail.com>2004-03-18 22:20:26 +0000
commitb87cc3c164e227fb72621b61034dea232b863cb3 (patch)
tree50d06eb886ec0498a7f1ebd2ab3a4a11b8700f34 /src/decode.c
parent692dd6bc29716316e59a2a079ce8253ae1680ae1 (diff)
downloadmpd-b87cc3c164e227fb72621b61034dea232b863cb3.tar.gz
mpd-b87cc3c164e227fb72621b61034dea232b863cb3.tar.xz
mpd-b87cc3c164e227fb72621b61034dea232b863cb3.zip
seek support for mp4/aac
git-svn-id: https://svn.musicpd.org/mpd/trunk@281 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r--src/decode.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/decode.c b/src/decode.c
index 4a9ed21ae..19efd6b1e 100644
--- a/src/decode.c
+++ b/src/decode.c
@@ -155,9 +155,10 @@ void decodeSeek(PlayerControl * pc, AudioFormat * af, DecoderControl * dc,
waitOnDecode(pc,af,dc,cb);
}
if(*decode_pid>0 && dc->state==DECODE_STATE_DECODE) {
- dc->seekWhere = pc->seekWhere > pc->totalTime-1 ?
- pc->totalTime-1 : pc->seekWhere;
- dc->seekWhere = 1 > dc->seekWhere ? 1 : dc->seekWhere;
+ dc->seekWhere = pc->seekWhere > pc->totalTime-0.1 ?
+ pc->totalTime-0.1 :
+ pc->seekWhere;
+ dc->seekWhere = 0 > dc->seekWhere ? 0 : dc->seekWhere;
cb->begin = 0;
dc->seek = 1;
pc->elapsedTime = dc->seekWhere;