8000 mp4: read the tmpo atom as a big-endian integer by SashaMIT · Pull Request #117 · dhowden/tag · GitHub
[go: up one dir, main page]

Skip to content

mp4: read the tmpo atom as a big-endian integer - #117

Open
SashaMIT wants to merge 1 commit into
dhowden:masterfrom
SashaMIT:fix/mp4-tmpo
Open

SashaMIT wants to merge 1 commit into
dhowden:masterfrom
SashaMIT:fix/mp4-tmpo

Conversation

@SashaMIT
@SashaMIT SashaMIT commented Oct 12, 2026 •
Copy link
Copy Markdown

Fixes #112.

The tmpo atom is type 21. iTunes stores the tempo as a big-endian integer whose width is the value length, usually two bytes. readAtomData kept only the first byte, so a tempo below 256 was stored as 0 and 300 was stored as 1.

TestMP4TempoReadsBigEndianInteger reads 120 (00 78) and 300 (01 2c). Without the tmpo branch those values come back as 0 and 1.

Other type 21 atoms still use the first byte. cpil is one byte, and widening every uint8 value would turn a padded flag into a larger integer.

Type 21 stores the tempo in the whole value. The first byte alone is 0
for every tempo below 256.
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.

tmpo Mp4 tag always 0

1 participant

0