summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2004-08-03 21:54:24 +0000
committerJens Arnold <amiconn@rockbox.org>2004-08-03 21:54:24 +0000
commit35b6dc3ea75880df9b5cd51017aa6ad58ab10829 (patch)
treef3848bc0b5e75a9bcea2247fe98da8021a36c422
parent85890b88df7d4cc315167409e6364418e5348324 (diff)
A little more straightforward vbr header checks
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4986 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/mp3data.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/firmware/mp3data.c b/firmware/mp3data.c
index 5dbf49a6da..7c8c75833b 100644
--- a/firmware/mp3data.c
+++ b/firmware/mp3data.c
@@ -398,10 +398,7 @@ int get_mp3file_info(int fd, struct mp3info *info)
vbrheader = frame + 17;
}
- if (vbrheader[0] == 'X' &&
- vbrheader[1] == 'i' &&
- vbrheader[2] == 'n' &&
- vbrheader[3] == 'g')
+ if (!memcmp(vbrheader, "Xing", 4))
{
int i = 8; /* Where to start parsing info */
@@ -452,10 +449,7 @@ int get_mp3file_info(int fd, struct mp3info *info)
}
}
- if (vbrheader[0] == 'V' &&
- vbrheader[1] == 'B' &&
- vbrheader[2] == 'R' &&
- vbrheader[3] == 'I')
+ if (!memcmp(vbrheader, "VBRI", 4))
{
DEBUGF("VBRI header\n");
@@ -517,10 +511,7 @@ int get_mp3file_info(int fd, struct mp3info *info)
}
/* Is it a LAME Info frame? */
- if (vbrheader[0] == 'I' &&
- vbrheader[1] == 'n' &&
- vbrheader[2] == 'f' &&
- vbrheader[3] == 'o')
+ if (!memcmp(vbrheader, "Info", 4))
{
/* Make sure we skip this frame in playback */
bytecount += info->frame_size;