Commit 05db1717 by Dustin

Remove method I didn't end up needing

parent e7cbb3d5
...@@ -565,22 +565,4 @@ public final class ParsableByteArray { ...@@ -565,22 +565,4 @@ public final class ParsableByteArray {
position += length; position += length;
return value; 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;
}
} }
...@@ -143,14 +143,8 @@ public class MpegAudioChunkHandler extends ChunkHandler { ...@@ -143,14 +143,8 @@ public class MpegAudioChunkHandler extends ChunkHandler {
public void setIndex(int index) { public void setIndex(int index) {
super.setIndex(index); super.setIndex(index);
syncTime(); 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; frameRemaining = 0;
} }
}
private void syncTime() { private void syncTime() {
timeUs = clock.getUs(); timeUs = clock.getUs();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment