diff --git a/library/common/src/main/java/com/google/android/exoplayer2/util/ParsableByteArray.java b/library/common/src/main/java/com/google/android/exoplayer2/util/ParsableByteArray.java index 6c989c5639..79913d2aa9 100644 --- a/library/common/src/main/java/com/google/android/exoplayer2/util/ParsableByteArray.java +++ b/library/common/src/main/java/com/google/android/exoplayer2/util/ParsableByteArray.java @@ -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; - } }