forked from len0rd/rockbox
APEv2: AA: Fix a couple of bugs.
Change-Id: I1345d53f904d9c529dd6e2a7875dab97ffc9c2f3
This commit is contained in:
parent
5c38669476
commit
d86240cf91
1 changed files with 2 additions and 2 deletions
|
@ -151,7 +151,7 @@ bool read_ape_tags(int fd, struct mp3entry* id3)
|
||||||
r = read_string(fd, value, sizeof(value), 0, -1);
|
r = read_string(fd, value, sizeof(value), 0, -1);
|
||||||
r += read_string(fd, value, sizeof(value), -1, 4);
|
r += read_string(fd, value, sizeof(value), -1, 4);
|
||||||
|
|
||||||
if (r == -1)
|
if (r < 0)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -175,7 +175,7 @@ bool read_ape_tags(int fd, struct mp3entry* id3)
|
||||||
if (id3->albumart.type != AA_TYPE_UNKNOWN)
|
if (id3->albumart.type != AA_TYPE_UNKNOWN)
|
||||||
{
|
{
|
||||||
id3->albumart.pos = lseek(fd, - 4, SEEK_CUR);
|
id3->albumart.pos = lseek(fd, - 4, SEEK_CUR);
|
||||||
id3->albumart.size = item.length - r;
|
id3->albumart.size = item.length - r - 4;
|
||||||
id3->has_embedded_albumart = true;
|
id3->has_embedded_albumart = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue