Check for ID3v1 tags (#738)

This commit is contained in:
Martijn van Beurden 2024-08-30 11:10:08 +02:00 committed by GitHub
parent e2aef0c275
commit 348b3a449f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 0 deletions

View File

@ -339,6 +339,11 @@ FLAC__bool DecoderSession_init_decoder(DecoderSession *decoder_session, const ch
return false;
}
}
fseek(f, -128, SEEK_END); /* Do not check for errors, because it could be that file is less than 128 bytes long */
fread(buffer, 1, 3, f);
if(memcmp(buffer, "TAG", 3) == 0){
flac__utils_printf(stderr, 1, "%s: NOTE, found something that looks like an ID3v1 tag. If decoding returns an error, this ID3v1 tag is probably the cause.\n", decoder_session->inbasefilename);
}
fclose(f);
}