Repository navigation
symphonia: the README says a stream with no audio frame does not open - #93
Merged
Merged
Conversation
Symphonia 0.6.1 synchronises to the first audio frame while it opens a FLAC stream (symphonia-bundle-flac's demuxer.rs, init_with_metadata: `parser.resync(&mut reader)?`), so a stream of no frames, which `flac` writes for an empty input, fails to open with "unexpected end of file", where `flac -d` writes an empty output and exits 0. That is the library's, and the program reports it as it comes. Run on darwin-arm64 on flac's encoding of an empty input. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: closer-claudio <claudio@farcloser.world>
closer-claudio
enabled auto-merge
November 22, 2026 02:05
Contributor
Author
|
Reviewed at c1760e4 |
apostasie
approved these changes
Nov 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎯 Why
symphoniaexits 1 on a FLAC stream that has no audio frame, whereflac -dwrites an empty output and exits 0, and nothing said so. A consumer comparing the two on such a stream could not tell which side the difference came from.🛠️ What
One sentence in
symphonia/README.md: Symphonia looks for the first audio frame as it opens a stream, and reportsunexpected end of filewhen there is none. The program is not changed: it reports what the library reports.RFC 9639 asks for one or more frames after the metadata (https://www.rfc-editor.org/rfc/rfc9639.html#section-9), so such a stream is outside the letter of the format; the difference is with the reference tools, which write and read it.
🧪 How
On darwin-arm64, with this repository's
flac1.5.0 andsymphonia:: > empty.raw; flac -s --force-raw-format --endian=little --sign=signed --channels=2 --bps=16 --sample-rate=44100 -o e.flac empty.rawflac -s -d -o e.wav e.flac: exit 0.symphonia e.flac o.raw:unexpected end of file, exit 1.The cause, read in symphonia-bundle-flac 0.6.1:
src/demuxer.rs,init_with_metadata,parser.resync(&mut reader)?after the metadata blocks.📝 Notes
No code, build or test changes.