encodesFlacLosslessAudio and encodesOpus asserted only that a non-empty file appeared. Five siblings in the same class check what is in it — encodesWav reads RIFF two lines away, and GIF, Matroska, MP3, H.264 and H.265 all assert a container marker or a track MIME.
Why it matters
convert() throws on a non-zero return code, so these two did prove the command ran. What they could not distinguish is the command running and producing the wrong thing — a failure mode this codebase has already had once: F1 in docs/coverage-read-findings.md records a live Vorbis arm in FFmpegCommandBuilder that ContainerCapabilities says cannot exist.
Mutation: point OutputFormat.FLAC's arm at pcm_s16le. Both tests stayed green.
The change
Four bytes each, in the idiom the class already uses:
format
container
ffmpeg -f
marker
OutputFormat.FLAC
Container.FLAC
flac
fLaC
OutputFormat.OPUS
Container.OGG
ogg
OggS
Opus asserts the container marker rather than the codec — that is what the other container-level assertions in this class check, and it is four bytes at offset 0.
Verification
Both muxers were driven directly to confirm the markers rather than inferring them from the codec name:
Closes #228.
`encodesFlacLosslessAudio` and `encodesOpus` asserted only that a non-empty file appeared. Five siblings in the same class check what is *in* it — `encodesWav` reads `RIFF` two lines away, and GIF, Matroska, MP3, H.264 and H.265 all assert a container marker or a track MIME.
## Why it matters
`convert()` throws on a non-zero return code, so these two did prove the command *ran*. What they could not distinguish is the command running and producing **the wrong thing** — a failure mode this codebase has already had once: **F1** in `docs/coverage-read-findings.md` records a live Vorbis arm in `FFmpegCommandBuilder` that `ContainerCapabilities` says cannot exist.
*Mutation:* point `OutputFormat.FLAC`'s arm at `pcm_s16le`. Both tests stayed green.
## The change
Four bytes each, in the idiom the class already uses:
| format | container | ffmpeg `-f` | marker |
|---|---|---|---|
| `OutputFormat.FLAC` | `Container.FLAC` | `flac` | `fLaC` |
| `OutputFormat.OPUS` | `Container.OGG` | `ogg` | `OggS` |
Opus asserts the **container** marker rather than the codec — that is what the other container-level assertions in this class check, and it is four bytes at offset 0.
## Verification
Both muxers were driven directly to confirm the markers rather than inferring them from the codec name:
```
$ ffmpeg -f lavfi -i sine=... -c:a flac -f flac t.flac && head -c4 t.flac # fLaC
$ ffmpeg -f lavfi -i sine=... -c:a libopus -f ogg t.opus && head -c4 t.opus # OggS
```
The marker belongs to the container, so it does not vary with the ffmpeg build. CI's five legs run the assertions against the shipped ffmpeg-kit.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Closes #228.
encodesFlacLosslessAudioandencodesOpusasserted only that a non-empty file appeared. Five siblings in the same class check what is in it —encodesWavreadsRIFFtwo lines away, and GIF, Matroska, MP3, H.264 and H.265 all assert a container marker or a track MIME.Why it matters
convert()throws on a non-zero return code, so these two did prove the command ran. What they could not distinguish is the command running and producing the wrong thing — a failure mode this codebase has already had once: F1 indocs/coverage-read-findings.mdrecords a live Vorbis arm inFFmpegCommandBuilderthatContainerCapabilitiessays cannot exist.Mutation: point
OutputFormat.FLAC's arm atpcm_s16le. Both tests stayed green.The change
Four bytes each, in the idiom the class already uses:
-fOutputFormat.FLACContainer.FLACflacfLaCOutputFormat.OPUSContainer.OGGoggOggSOpus asserts the container marker rather than the codec — that is what the other container-level assertions in this class check, and it is four bytes at offset 0.
Verification
Both muxers were driven directly to confirm the markers rather than inferring them from the codec name:
The marker belongs to the container, so it does not vary with the ffmpeg build. CI's five legs run the assertions against the shipped ffmpeg-kit.
🤖 Generated with Claude Code