提交 e29cb374 编写于 作者: O olly 提交者: Oliver Woodman

Fix WavExtractor bug.

When skipToData is called the peek position is not equal
to the read position of the input. Hence peeking a chunk
header and then skipping by that amount wont do the right
thing :)!
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=122157603
上级 9bfe62a5
......@@ -125,6 +125,9 @@ import java.io.IOException;
Assertions.checkNotNull(input);
Assertions.checkNotNull(wavHeader);
// Make sure the peek position is set to the read position before we peek the first header.
input.resetPeekPosition();
ParsableByteArray scratch = new ParsableByteArray(ChunkHeader.SIZE_IN_BYTES);
// Skip all chunks until we hit the data header.
ChunkHeader chunkHeader = ChunkHeader.peek(input, scratch);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册