mirror of
https://github.com/androidx/media.git
synced 2025-05-08 16:10:38 +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;
|
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,13 +143,7 @@ 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) {
|
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() {
|
private void syncTime() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user