mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-27 15:45:56 -05:00
fix bad seek resync on large tags (covr)
This commit is contained in:
parent
f6bab734d1
commit
5ed16bc1ca
@ -197,7 +197,6 @@ int scan_get_aacinfo(char *filename, MP3FILE *pmp3) {
|
|||||||
pmp3->file_size = ftell(fin);
|
pmp3->file_size = ftell(fin);
|
||||||
fseek(fin,0,SEEK_SET);
|
fseek(fin,0,SEEK_SET);
|
||||||
|
|
||||||
|
|
||||||
atom_offset=scan_aac_drilltoatom(fin, "moov:udta:meta:ilst", &atom_length);
|
atom_offset=scan_aac_drilltoatom(fin, "moov:udta:meta:ilst", &atom_length);
|
||||||
if(atom_offset != -1) {
|
if(atom_offset != -1) {
|
||||||
/* found the tag section - need to walk through now */
|
/* found the tag section - need to walk through now */
|
||||||
@ -222,7 +221,7 @@ int scan_get_aacinfo(char *filename, MP3FILE *pmp3) {
|
|||||||
|
|
||||||
if(current_size > 4096) { /* Does this break anything? */
|
if(current_size > 4096) { /* Does this break anything? */
|
||||||
/* too big! cover art, maybe? */
|
/* too big! cover art, maybe? */
|
||||||
fseek(fin,current_size - 8 - 7,SEEK_CUR);
|
fseek(fin,current_size - 8,SEEK_CUR);
|
||||||
} else {
|
} else {
|
||||||
len=current_size-7; /* for ill-formed too-short tags */
|
len=current_size-7; /* for ill-formed too-short tags */
|
||||||
if(len < 22)
|
if(len < 22)
|
||||||
|
@ -110,7 +110,7 @@ int scan_get_mp4info(char *filename, MP3FILE *pmp3) {
|
|||||||
|
|
||||||
if(current_size > 4096) { /* Does this break anything? */
|
if(current_size > 4096) { /* Does this break anything? */
|
||||||
/* too big! cover art, maybe? */
|
/* too big! cover art, maybe? */
|
||||||
fseek(fin,current_size - 8 - 7,SEEK_CUR);
|
fseek(fin,current_size - 8,SEEK_CUR);
|
||||||
} else {
|
} else {
|
||||||
len=current_size-7; /* for ill-formed too-short tags */
|
len=current_size-7; /* for ill-formed too-short tags */
|
||||||
if(len < 22)
|
if(len < 22)
|
||||||
|
Loading…
Reference in New Issue
Block a user