Symphonia: Decoded frame count doesn't match the file's frame count
First of all, thanks for making and sharing this library, I’m very happy to have discovered it, kudos!
I’ve noticed some behaviour that I don’t understand while decoding some .wav files (I haven’t checked all of their formats, but typically they’re stereo 16bit, 44.1k, PCM).
Is it expected that the sum of all decoded AudioBufferRef
frame counts should match the n_frames
value defined in the track’s codec params? I’m finding that in the last decoded packet, there are sometimes extra frames in the buffer, which then contain data that isn’t in the file (e.g. Each buffer’s frame count is 1158
through the file, then the final buffer contains 541
frames, when there are only 118
frames remaining according to the count).
I can share an example if you like but I figured I’d better check first if I’m just misunderstanding something in the API.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 16 (10 by maintainers)
Commits related to this issue
- wav: Out-of-cycle release v0.4.1. This is an out-of-cycle release for #85. — committed to pdeljanov/Symphonia by pdeljanov 2 years ago
- wav: Do not read past the end of a data chunk. Fixes #85. — committed to amadeusine/Symphonia by pdeljanov 3 years ago
This should be fixed now. Feel free to let me know if you run into any other issues. Cheers!