mirror of
https://github.com/androidx/media.git
synced 2025-05-12 10:09:55 +08:00

On retrying loading a chunk, the state of the extractor was reset due to a call to seek(). Prevent this call by only calling init() if no bytes were loaded. Also make the DefaultExtractorInput use the loading position not the original stream position so that its getPosition() method returns offsets relative to the start of the stream, which fixes a bug where the chunk index offsets would be relative to the wrong position if there was a retry while loading the chunk.