aboutsummaryrefslogtreecommitdiffstats
path: root/src/mp4_decode.c
diff options
context:
space:
mode:
authorWarren Dukes <warren.dukes@gmail.com>2004-05-19 02:14:20 +0000
committerWarren Dukes <warren.dukes@gmail.com>2004-05-19 02:14:20 +0000
commitc180d2f95ee8621b743664f0a3c8003682705801 (patch)
treeaeed9a0ea22a2cd7215b308ba1fc973d5215345c /src/mp4_decode.c
parentbf9e2afbf9f8c9ec44dbad033290c8fe66d170f6 (diff)
downloadmpd-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 '')
-rw-r--r--src/mp4_decode.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mp4_decode.c b/src/mp4_decode.c
index dccc7a846..010e0524f 100644
--- a/src/mp4_decode.c
+++ b/src/mp4_decode.c
@@ -249,7 +249,7 @@ int mp4_decode(OutputBuffer * cb, DecoderControl * dc) {
break;
}
- if(dc->start) {
+ if(dc->state != DECODE_STATE_DECODE) {
channels = frameInfo.channels;
#ifdef HAVE_FAACDECFRAMEINFO_SAMPLERATE
scale = frameInfo.samplerate;
@@ -259,7 +259,6 @@ int mp4_decode(OutputBuffer * cb, DecoderControl * dc) {
getOutputAudioFormat(&(dc->audioFormat),
&(cb->audioFormat));
dc->state = DECODE_STATE_DECODE;
- dc->start = 0;
}
if(channels*(dur+offset) > frameInfo.samples) {
@@ -297,7 +296,7 @@ int mp4_decode(OutputBuffer * cb, DecoderControl * dc) {
closeInputStream(&inStream);
free(mp4cb);
- 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;