Skip to content

Commit

Permalink
Fix AIFF-C writing without foreign metadata input
Browse files Browse the repository at this point in the history
Fixes #767
  • Loading branch information
ktmf01 committed Dec 3, 2024
1 parent 669eae9 commit dca8eaf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/flac/decode.c
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,7 @@ FLAC__bool write_iff_headers(FILE *f, DecoderSession *decoder_session, FLAC__uin
else if(format == FORMAT_AIFF)
iff_size = 46 + foreign_metadata_size + aligned_data_size;
else /* AIFF-C */
iff_size = 16 + foreign_metadata_size + aligned_data_size + (fm?fm->aifc_comm_length:0);
iff_size = 16 + foreign_metadata_size + aligned_data_size + (fm?fm->aifc_comm_length:36);

if(format != FORMAT_WAVE64 && format != FORMAT_RF64 && iff_size >= 0xFFFFFFF4) {
flac__utils_printf(stderr, 1, "%s: ERROR: stream is too big to fit in a single %s file\n", decoder_session->inbasefilename, fmt_desc);
Expand Down

0 comments on commit dca8eaf

Please sign in to comment.