forked from len0rd/rockbox
Removed a warning
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3568 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
7fdef57d57
commit
1b466e0e58
1 changed files with 5 additions and 8 deletions
|
|
@ -689,15 +689,9 @@ int create_xing_header(int fd, int startpos, int filesize,
|
||||||
|
|
||||||
last_pos = pos;
|
last_pos = pos;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
memcpy(buf + index + 100, cooltext, sizeof(cooltext));
|
/* Copy the MPEG version and sample rate from the mpeg stream into
|
||||||
|
the Xing header */
|
||||||
/* 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)
|
|
||||||
{
|
|
||||||
saved_header &= (VERSION_MASK | SAMPLERATE_MASK);
|
saved_header &= (VERSION_MASK | SAMPLERATE_MASK);
|
||||||
|
|
||||||
buf[1] |= (saved_header >> 16) & 0xff;
|
buf[1] |= (saved_header >> 16) & 0xff;
|
||||||
|
|
@ -705,9 +699,12 @@ int create_xing_header(int fd, int startpos, int filesize,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
/* Fill in the MPEG version and sample rate into the Xing header */
|
||||||
buf[1] |= mpeg_version << 3;
|
buf[1] |= mpeg_version << 3;
|
||||||
buf[2] |= sample_rate << 2;
|
buf[2] |= sample_rate << 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
memcpy(buf + index + 100, cooltext, sizeof(cooltext));
|
||||||
|
|
||||||
/* Now get the length of the newly created frame */
|
/* Now get the length of the newly created frame */
|
||||||
header = BYTES2INT(buf[0], buf[1], buf[2], buf[3]);
|
header = BYTES2INT(buf[0], buf[1], buf[2], buf[3]);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue