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.
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