aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/aac_plugin.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-01-17 13:23:42 +0100
committerMax Kellermann <max@duempel.org>2009-01-17 13:23:42 +0100
commit5395f5f6b34b6a98e94c8f3e8329150a2a4b9cac (patch)
treebb1e42988bd79c452b667da84ef662b45da8aa8e /src/decoder/aac_plugin.c
parent43eefe9c41478f5605e4abd7e6c7fc6d710341e8 (diff)
downloadmpd-5395f5f6b34b6a98e94c8f3e8329150a2a4b9cac.tar.gz
mpd-5395f5f6b34b6a98e94c8f3e8329150a2a4b9cac.tar.xz
mpd-5395f5f6b34b6a98e94c8f3e8329150a2a4b9cac.zip
moved fallback APE/ID3 tag loader to song.c
Some plugins used the APE or ID3 tag loader as a fallback when their own methods of loading tags did not work. Move this code out of all decoder plugins, into song_file_update().
Diffstat (limited to 'src/decoder/aac_plugin.c')
-rw-r--r--src/decoder/aac_plugin.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/decoder/aac_plugin.c b/src/decoder/aac_plugin.c
index f2907129e..90d39113b 100644
--- a/src/decoder/aac_plugin.c
+++ b/src/decoder/aac_plugin.c
@@ -443,19 +443,18 @@ aac_stream_decode(struct decoder *mpd_decoder, struct input_stream *inStream)
static struct tag *aacTagDup(const char *file)
{
- struct tag *ret = NULL;
int file_time = getAacTotalTime(file);
+ struct tag *tag;
- if (file_time >= 0) {
- if ((ret = tag_id3_load(file)) == NULL)
- ret = tag_new();
- ret->time = file_time;
- } else {
+ if (file_time < 0) {
g_debug("aacTagDup: Failed to get total song time from: %s\n",
file);
+ return NULL;
}
- return ret;
+ tag = tag_new();
+ tag->time = file_time;
+ return tag;
}
static const char *const aac_suffixes[] = { "aac", NULL };