Skip to content

Preserve QuickTime v2 audio sample entries - #213

Draft
kixelated wants to merge 1 commit into
mainfrom
codex/quicktime-v2-audio
Draft

Preserve QuickTime v2 audio sample entries#213
kixelated wants to merge 1 commit into
mainfrom
codex/quicktime-v2-audio

Conversation

@kixelated

Copy link
Copy Markdown
Owner

Summary

  • expose and preserve QuickTime audio sample entry versions and their version-specific fields
  • decode version 2 sample rates and channel counts from the authoritative extension fields
  • represent sample rates as f64 and channel counts as u32, while validating the narrower version 0/1 encoding limits
  • retain version 2 entries when re-encoding instead of emitting a version 0-shaped entry with placeholder values

Root cause

Version 2 entries put placeholder values in the legacy prefix (3 channels and 1 Hz). The decoder read the authoritative f64 sample rate and u32 channel count from the version 2 extension but discarded them. Encoding then always emitted a version 0 entry, so decoded version 2 audio could be re-encoded with the placeholders as real values.

Impact

High-rate and QuickTime PCM audio now reports its actual rate and channel count, including rates above 65535 Hz, and round-trips without losing the version 2 layout.

Validation

  • cargo test --all-targets --all-features
  • cargo clippy --all-targets --all-features -- -D warnings
  • cargo fmt --all -- --check
  • git diff --check

Closes #195

@kixelated

Copy link
Copy Markdown
Owner Author

IDK if I care enough about QuickTime?

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.

Audio sample entries: QuickTime version 2 rate/channels discarded (decodes as 3 ch @ 1 Hz)

1 participant