Fix ByteBuffer.array() warning

PiperOrigin-RevId: 594274620
This commit is contained in:
sheenachhabra 2023-12-28 10:04:55 -08:00 committed by Copybara-Service
parent 1609928242
commit b0e00a7d28

View File

@ -34,7 +34,9 @@ public final class DumpableMp4Box implements Dumper.Dumpable {
* @param box The Mp4 box to wrap.
*/
public DumpableMp4Box(ByteBuffer box) {
this.box = new ParsableByteArray(box.array());
byte[] boxArray = new byte[box.remaining()];
box.get(boxArray);
this.box = new ParsableByteArray(boxArray);
}
@Override