fix bad seek resync on large tags (covr)

This commit is contained in:
Ron Pedde 2006-04-27 06:12:43 +00:00
parent f6bab734d1
commit 5ed16bc1ca
2 changed files with 2 additions and 3 deletions

View File

@ -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)

View File

@ -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)