Skip to content

Conversation

devoxin
Copy link
Member

@devoxin devoxin commented Apr 28, 2024

Fixes an issue where the retrieved sampleRate value was an arbitrary number, not indicative of the actual sample rate. This lead to invalid duration values.

This seems to be caused by an error in the firstPacket buffer contents after reading comments and tags, so it's read before any of that occurs.

This has been tested and appears to work correctly, yielding the correct value of 48000 in my test files.

This commit has also been tested and is inline with the ID header specification found at https://wiki.xiph.org/OggOpus#ID_Header

@devoxin devoxin merged commit 9a91acd into main Apr 28, 2024
@devoxin devoxin deleted the fix-ogg-opus-duration-extraction branch April 28, 2024 22:18
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.

2 participants