summaryrefslogtreecommitdiffstats
path: root/apps/metadata/id3tags.c
diff options
context:
space:
mode:
authorNick Peskett <rockbox@peskett.co.uk>2011-12-19 15:19:07 +0000
committerNick Peskett <rockbox@peskett.co.uk>2011-12-19 15:19:07 +0000
commitf53c04b766f470eb58c919b7d38f8bfec654c797 (patch)
tree7e1df77f3272ae01239695b838959311c90c78fb /apps/metadata/id3tags.c
parent476f4a7bafd4be64dde6deaff0e1ab8a7a0e7411 (diff)
downloadrockbox-f53c04b766f470eb58c919b7d38f8bfec654c797.tar.gz
rockbox-f53c04b766f470eb58c919b7d38f8bfec654c797.tar.bz2
rockbox-f53c04b766f470eb58c919b7d38f8bfec654c797.zip
Make embedded cuesheet type 1 text encoding check slightly more efficient
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31363 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/metadata/id3tags.c')
-rw-r--r--apps/metadata/id3tags.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/metadata/id3tags.c b/apps/metadata/id3tags.c
index 6fd6b154e5..edd58da3f5 100644
--- a/apps/metadata/id3tags.c
+++ b/apps/metadata/id3tags.c
@@ -1007,9 +1007,10 @@ void setid3v2title(int fd, struct mp3entry *entry)
char_enc = CHAR_ENC_ISO_8859_1;
break;
case 0x01:
- if (!memcmp(tag, "\1\xfe\xff", 3))
+ tag++;
+ if (!memcmp(tag, "\xfe\xff", 2))
char_enc = CHAR_ENC_UTF_16_BE;
- else if (!memcmp(tag, "\1\xff\xfe", 3))
+ else if (!memcmp(tag, "\xff\xfe", 2))
char_enc = CHAR_ENC_UTF_16_LE;
/* \1 + BOM(2) + C0U0E0S0H0E0E0T000 = 21 */
cuesheet_offset = 21;