Remove method I didn't end up needing

This commit is contained in:
Dustin 2022-02-06 06:22:41 -07:00
parent e7cbb3d50a
commit 05db1717c0
2 changed files with 1 additions and 25 deletions

View File

@ -565,22 +565,4 @@ public final class ParsableByteArray {
position += length;
return value;
}
/**
* The data from the end of the buffer is copied to the front
* The limit() because the bytesLeft() and position is zero
*/
public void compact() {
if (bytesLeft() == 0) {
limit = 0;
} else {
final ByteBuffer byteBuffer = ByteBuffer.wrap(data);
byteBuffer.limit(limit);
byteBuffer.position(position);
byteBuffer.compact();
byteBuffer.flip();
limit = byteBuffer.limit();
}
position = 0;
}
}

View File

@ -143,14 +143,8 @@ public class MpegAudioChunkHandler extends ChunkHandler {
public void setIndex(int index) {
super.setIndex(index);
syncTime();
if (frameRemaining != 0) {
// We have a partial frame in the output, no way to clear it, so just send it as is.
// Next frame should be key frame, so the codec should recover.
trackOutput.sampleMetadata(timeUs, 0, header.frameSize - frameRemaining,
0, null);
frameRemaining = 0;
}
}
private void syncTime() {
timeUs = clock.getUs();