diff options
author | Warren Dukes <warren.dukes@gmail.com> | 2004-03-22 02:44:22 +0000 |
---|---|---|
committer | Warren Dukes <warren.dukes@gmail.com> | 2004-03-22 02:44:22 +0000 |
commit | 145f0b62d26974c5e15ad65c902045fe671a9d05 (patch) | |
tree | f86617eeae1a30f1e97a35507b93756a99cf0b29 /src/decode.c | |
parent | 4c1eb9225d5a741e1234d48eb38a8df3da908259 (diff) | |
download | mpd-145f0b62d26974c5e15ad65c902045fe671a9d05.tar.gz mpd-145f0b62d26974c5e15ad65c902045fe671a9d05.tar.xz mpd-145f0b62d26974c5e15ad65c902045fe671a9d05.zip |
aac decoding!
need to work on seeking for AAC
also, don't reset cb->begin on seek to 0,
instead just set cb->end=cb->begin, works much better for
disabling seeking (like ADIF AAC's)
git-svn-id: https://svn.musicpd.org/mpd/trunk@356 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/decode.c')
-rw-r--r-- | src/decode.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/decode.c b/src/decode.c index b80166af4..334812d8b 100644 --- a/src/decode.c +++ b/src/decode.c @@ -40,6 +40,7 @@ #endif #ifdef HAVE_FAAD #include "mp4_decode.h" +#include "aac_decode.h" #endif #include <signal.h> @@ -159,11 +160,11 @@ void decodeSeek(PlayerControl * pc, AudioFormat * af, DecoderControl * dc, pc->totalTime-0.1 : pc->seekWhere; dc->seekWhere = 0 > dc->seekWhere ? 0 : dc->seekWhere; - cb->begin = 0; + dc->seekError = 0; dc->seek = 1; - pc->elapsedTime = dc->seekWhere; pc->bitRate = 0; while(*decode_pid>0 && dc->seek) usleep(1000); + if(dc->seekError) pc->elapsedTime = dc->seekWhere; } } pc->seek = 0; @@ -229,6 +230,9 @@ int decoderInit(PlayerControl * pc, Buffer * cb, AudioFormat *af, break; #endif #ifdef HAVE_FAAD + case DECODE_TYPE_AAC: + dc->error = aac_decode(cb,af,dc); + break; case DECODE_TYPE_MP4: dc->error = mp4_decode(cb,af,dc); break; |