diff options
author | Warren Dukes <warren.dukes@gmail.com> | 2004-05-19 02:14:20 +0000 |
---|---|---|
committer | Warren Dukes <warren.dukes@gmail.com> | 2004-05-19 02:14:20 +0000 |
commit | c180d2f95ee8621b743664f0a3c8003682705801 (patch) | |
tree | aeed9a0ea22a2cd7215b308ba1fc973d5215345c /src/aac_decode.c | |
parent | bf9e2afbf9f8c9ec44dbad033290c8fe66d170f6 (diff) | |
download | mpd-c180d2f95ee8621b743664f0a3c8003682705801.tar.gz mpd-c180d2f95ee8621b743664f0a3c8003682705801.tar.xz mpd-c180d2f95ee8621b743664f0a3c8003682705801.zip |
try to make seeking more non-blocking
git-svn-id: https://svn.musicpd.org/mpd/trunk@1076 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/aac_decode.c')
-rw-r--r-- | src/aac_decode.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/aac_decode.c b/src/aac_decode.c index ddc8b62d9..cc3b8ee69 100644 --- a/src/aac_decode.c +++ b/src/aac_decode.c @@ -341,13 +341,12 @@ int aac_decode(OutputBuffer * cb, DecoderControl * dc) { sampleRate = frameInfo.samplerate; #endif - if(dc->start) { + if(dc->state != DECODE_STATE_DECODE) { dc->audioFormat.channels = frameInfo.channels; dc->audioFormat.sampleRate = sampleRate; getOutputAudioFormat(&(dc->audioFormat), &(cb->audioFormat)); dc->state = DECODE_STATE_DECODE; - dc->start = 0; } advanceAacBuffer(&b,frameInfo.bytesconsumed); @@ -382,7 +381,7 @@ int aac_decode(OutputBuffer * cb, DecoderControl * dc) { closeInputStream(b.inStream); if(b.buffer) free(b.buffer); - if(dc->start) return -1; + if(dc->state != DECODE_STATE_DECODE) return -1; if(!dc->stop && !dc->seek && chunkLen>0) { cb->chunkSize[cb->end] = chunkLen; |