summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2003-04-19 02:09:56 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2003-04-19 02:09:56 +0000
commit1b466e0e58412c4a3df8d50f295b0b7320dd233b (patch)
tree017f3c641377957164a90a71e7714b029718cf28
parent7fdef57d572a5f81f5efec4fd6f73a4f797cc823 (diff)
Removed a warning
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3568 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/mp3data.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/firmware/mp3data.c b/firmware/mp3data.c
index 98dff50442..1b15092791 100644
--- a/firmware/mp3data.c
+++ b/firmware/mp3data.c
@@ -689,15 +689,9 @@ int create_xing_header(int fd, int startpos, int filesize,
last_pos = pos;
}
- }
-
- memcpy(buf + index + 100, cooltext, sizeof(cooltext));
- /* We must fill in the correct sample rate and mpeg version. If the TOC
- should be generated, we take that data from the actual stream. If not,
- we use the supplied parameters. */
- if(generate_toc)
- {
+ /* Copy the MPEG version and sample rate from the mpeg stream into
+ the Xing header */
saved_header &= (VERSION_MASK | SAMPLERATE_MASK);
buf[1] |= (saved_header >> 16) & 0xff;
@@ -705,9 +699,12 @@ int create_xing_header(int fd, int startpos, int filesize,
}
else
{
+ /* Fill in the MPEG version and sample rate into the Xing header */
buf[1] |= mpeg_version << 3;
buf[2] |= sample_rate << 2;
}
+
+ memcpy(buf + index + 100, cooltext, sizeof(cooltext));
/* Now get the length of the newly created frame */
header = BYTES2INT(buf[0], buf[1], buf[2], buf[3]);