mirror of
https://github.com/androidx/media.git
synced 2025-05-09 00:20:45 +08:00
Remove method I didn't end up needing
This commit is contained in:
parent
e7cbb3d50a
commit
05db1717c0
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user