mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
Properly seek to next id3v2 frame for unsynced tags.
When seeking to the next id3v2 frame we need to consider if the tag has the unsync flag set. Not doing so will likely make parsing end up in the middle of the current frame if the frame size exceeds the upper limit set during read. The latter usually happens for album art frames. Fixes FS#12849. Change-Id: Ic92853eef4374508d84df347bcc66b6661d5037d
This commit is contained in:
parent
1489fa3a15
commit
370ed6de7c
1 changed files with 10 additions and 3 deletions
|
@ -1113,8 +1113,15 @@ void setid3v2title(int fd, struct mp3entry *entry)
|
|||
}
|
||||
} else {
|
||||
/* Seek to the next frame */
|
||||
if(framelen < totframelen)
|
||||
if(framelen < totframelen) {
|
||||
if(global_unsynch && version <= ID3_VER_2_3) {
|
||||
size -= skip_unsynched(fd, totframelen - framelen);
|
||||
}
|
||||
else {
|
||||
lseek(fd, totframelen - framelen, SEEK_CUR);
|
||||
size -= totframelen - framelen;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue