Skip to content

Read XING header and check MusicLength - #56

Merged
Sjord merged 6 commits into
masterfrom
xing-header
Oct 21, 2026
Merged

Sjord merged 6 commits into
masterfrom
xing-header

Conversation

@Sjord

@Sjord Sjord commented Oct 17, 2026

Copy link
Copy Markdown
Owner

No description provided.

@Sjord

Sjord commented Oct 17, 2026

Copy link
Copy Markdown
Owner Author

#26

@Sjord Sjord linked an issue Oct 17, 2026 that may be closed by this pull request
@Sjord
Sjord marked this pull request as ready for review October 17, 2026 20:34
Sjord added 6 commits October 21, 2026 07:56
Check the TagCRC in the LAME extension over the tag frame. Report a mismatch as a new LTC error, since a modified LAME tag means the MusicCRC cannot be trusted.

Old LAME tags with an unpopulated extension have zero MusicLength, MusicCRC and TagCRC; ignore those instead of reporting a bogus music CRC error. Add regression fixtures for both cases.
Bring the 64-bit file size and seek offset changes to the Xing/LAME
header support.

- Store Xing frame and byte counts and the LAME MusicLength as int64_t.
- Use int64_t for all Xing/LAME header offsets and MusicCRC ranges.
- Compare Xing values against the widened actual frame and byte counts.
- Keep cfseek and cftell in the same int64_t offset domain.
- Stop instead of retrying forever when a frame read fails.
@Sjord
Sjord merged commit 4c75af8 into master Oct 21, 2026
2 checks passed
@Sjord
Sjord deleted the xing-header branch October 21, 2026 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Check if filesize and duration*bitrate match

1 participant