Skip to content

Commit

Permalink
Check for ID3v1 tags
Browse files Browse the repository at this point in the history
  • Loading branch information
ktmf01 committed Aug 29, 2024
1 parent b573a36 commit f0225a6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/flac/decode.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit f0225a6

Please sign in to comment.