xiph / xiph/flac

flac seems to write malformed AIFF-C, both none and sowt

Open
#767 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
2.4k
Forks
363
PR merge metrics
No merged PRs in 30d

Description

In the course of testing input file handling after this one - used: 1.4.3 and including https://github.com/xiph/flac/actions/runs/12089446877 which I think is the most recent?

Running the following on the attached .flac:

flac --force-aiff-c-none-format -dfo aiffcnone.aiff short.flac
flac --force-aiff-c-sowt-format -dfo aiffcsowt.aiff short.flac

... gets me the two .aiff files in the attachment.

Then try flac --no-padding aiffc*.aiff :

WARNING: FORM chunk size of file aiffcnone.aiff does not agree with filesize
aiffcnone.aiff: wrote 2222 bytes, ratio=0,135
WARNING: FORM chunk size of file aiffcsowt.aiff does not agree with filesize
aiffcsowt.aiff: wrote 2222 bytes, ratio=0,135

With --keep-foreign-metadata-if-present added:

WARNING: FORM chunk size of file aiffcnone.aiff does not agree with filesize
aiffcnone.aiff: WARNING reading foreign metadata: invalid AIFF file: unexpected EOF (012)
aiffcnone.aiff: wrote 2306 bytes, ratio=0,140
WARNING: FORM chunk size of file aiffcsowt.aiff does not agree with filesize
aiffcsowt.aiff: WARNING reading foreign metadata: invalid AIFF file: unexpected EOF (012)
aiffcsowt.aiff: wrote 2306 bytes, ratio=0,140

aiffc.zip

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with the two flac commands and the attached aiffc.zip files, then inspect the AIFF-C encoding and foreign-metadata handling paths. Done means both --force-aiff-c-none-format and --force-aiff-c-sowt-format produce AIFF-C files whose FORM chunk sizes match the file size and that can be read without the reported warnings.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
audio-video-rtc
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.