media
media copied to clipboard
AVI Seek and Audio Timing Fixes
Fixes to audio stream timing and seeking.
Fixes:
- Tracks the non-key frame stream(s) chunk position relative to the key frame stream chunk position. This is tracked as a "foreign" key frame reference in the non-key frame stream. This allows us to maintain perfect AV sync on seek.
- Use chunk count to calculate chunk timing. Frame count was being used. This can be 1:1, but usually isn't.
Enhancements:
- Remove the audio frame key frame tracking. All audio frames are keys frame. This can lead to a massive memory footprint for large files.
- Minor improvement in chunk mapping. Use a bitmask of type and stream id instead of the exact chunk id. This removes the need for a secondary check for streams with different stream sub types (video compressed/uncompressed).