summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGravatar waker <wakeroid@gmail.com>2012-09-15 10:33:01 +0200
committerGravatar waker <wakeroid@gmail.com>2012-09-15 10:33:01 +0200
commit734a399d3a70910d2f4995c9f61294c3e09f9263 (patch)
tree703064e1d580fba7f00141809ed1f3a8a3e0b3fb /plugins
parent9457522a3eb36685b753a3ca2d828d0aea84a85e (diff)
aac: fixed mp4 init
Diffstat (limited to 'plugins')
-rw-r--r--plugins/aac/aac.c49
1 files changed, 25 insertions, 24 deletions
diff --git a/plugins/aac/aac.c b/plugins/aac/aac.c
index 21cd1526..a7abece0 100644
--- a/plugins/aac/aac.c
+++ b/plugins/aac/aac.c
@@ -381,33 +381,34 @@ aac_init (DB_fileinfo_t *_info, DB_playItem_t *it) {
}
}
+ if (!info->mp4) {
+ trace ("aac: looking for raw stream...\n");
- trace ("aac: looking for raw stream...\n");
+ if (info->junk >= 0) {
+ deadbeef->fseek (info->file, info->junk, SEEK_SET);
+ }
+ else {
+ deadbeef->rewind (info->file);
+ }
+ int offs = parse_aac_stream (info->file, &samplerate, &channels, &duration, &totalsamples);
+ if (offs == -1) {
+ trace ("aac stream not found\n");
+ return -1;
+ }
+ if (offs > info->junk) {
+ info->junk = offs;
+ }
+ if (info->junk >= 0) {
+ deadbeef->fseek (info->file, info->junk, SEEK_SET);
+ }
+ else {
+ deadbeef->rewind (info->file);
+ }
+ trace ("found aac stream (junk: %d, offs: %d)\n", info->junk, offs);
- if (info->junk >= 0) {
- deadbeef->fseek (info->file, info->junk, SEEK_SET);
- }
- else {
- deadbeef->rewind (info->file);
+ _info->fmt.channels = channels;
+ _info->fmt.samplerate = samplerate;
}
- int offs = parse_aac_stream (info->file, &samplerate, &channels, &duration, &totalsamples);
- if (offs == -1) {
- trace ("aac stream not found\n");
- return -1;
- }
- if (offs > info->junk) {
- info->junk = offs;
- }
- if (info->junk >= 0) {
- deadbeef->fseek (info->file, info->junk, SEEK_SET);
- }
- else {
- deadbeef->rewind (info->file);
- }
- trace ("found aac stream (junk: %d, offs: %d)\n", info->junk, offs);
-
- _info->fmt.channels = channels;
- _info->fmt.samplerate = samplerate;
}
else {
// sync before attempting to init