- 28,932 files - Full Java source code - Smali files - Resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
40 lines
1.2 KiB
Java
40 lines
1.2 KiB
Java
package com.mbridge.msdk.playercommon.exoplayer2.decoder;
|
|
|
|
import java.nio.ByteBuffer;
|
|
import java.nio.ByteOrder;
|
|
|
|
/* loaded from: classes4.dex */
|
|
public class SimpleOutputBuffer extends OutputBuffer {
|
|
public ByteBuffer data;
|
|
private final SimpleDecoder<?, SimpleOutputBuffer, ?> owner;
|
|
|
|
public SimpleOutputBuffer(SimpleDecoder<?, SimpleOutputBuffer, ?> simpleDecoder) {
|
|
this.owner = simpleDecoder;
|
|
}
|
|
|
|
public ByteBuffer init(long j, int i) {
|
|
this.timeUs = j;
|
|
ByteBuffer byteBuffer = this.data;
|
|
if (byteBuffer == null || byteBuffer.capacity() < i) {
|
|
this.data = ByteBuffer.allocateDirect(i).order(ByteOrder.nativeOrder());
|
|
}
|
|
this.data.position(0);
|
|
this.data.limit(i);
|
|
return this.data;
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.playercommon.exoplayer2.decoder.Buffer
|
|
public void clear() {
|
|
super.clear();
|
|
ByteBuffer byteBuffer = this.data;
|
|
if (byteBuffer != null) {
|
|
byteBuffer.clear();
|
|
}
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.playercommon.exoplayer2.decoder.OutputBuffer
|
|
public void release() {
|
|
this.owner.releaseOutputBuffer(this);
|
|
}
|
|
}
|