mp3: when ID3 tags are not found, search APE tags

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26048 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Yoshihisa Uchida 2010-05-15 10:20:06 +00:00
parent 77ec4b301b
commit fecf90fda9
5 changed files with 14 additions and 6 deletions

View file

@ -28,7 +28,9 @@
#include "metadata.h"
#include "metadata_common.h"
#include "metadata_parsers.h"
#if CONFIG_CODEC == SWCODEC
#include "replaygain.h"
#endif
#include "misc.h"
/* Skip an ID3v2 tag if it can be found. We assume the tag is located at the
@ -250,7 +252,7 @@ long parse_tag(const char* name, char* value, struct mp3entry* id3,
char* buf, long buf_remaining, enum tagtype type)
{
long len = 0;
char** p;
char** p = NULL;
if ((((strcasecmp(name, "track") == 0) && (type == TAGTYPE_APE)))
|| ((strcasecmp(name, "tracknumber") == 0) && (type == TAGTYPE_VORBIS)))
@ -331,11 +333,13 @@ long parse_tag(const char* name, char* value, struct mp3entry* id3,
{
p = &(id3->mb_track_id);
}
#if CONFIG_CODEC == SWCODEC
else
{
len = parse_replaygain(name, value, id3, buf, buf_remaining);
p = NULL;
}
#endif
if (p)
{