Fix VideoDecoderOutputBuffer supplemental data
The limit of this.supplementalData was not reset. PiperOrigin-RevId: 273515718
This commit is contained in:
parent
a7db26c352
commit
fab2a0d55e
@ -97,8 +97,9 @@ public class VideoDecoderOutputBuffer extends OutputBuffer {
|
|||||||
int size = supplementalData.limit();
|
int size = supplementalData.limit();
|
||||||
if (this.supplementalData == null || this.supplementalData.capacity() < size) {
|
if (this.supplementalData == null || this.supplementalData.capacity() < size) {
|
||||||
this.supplementalData = ByteBuffer.allocate(size);
|
this.supplementalData = ByteBuffer.allocate(size);
|
||||||
|
} else {
|
||||||
|
this.supplementalData.clear();
|
||||||
}
|
}
|
||||||
this.supplementalData.position(0);
|
|
||||||
this.supplementalData.put(supplementalData);
|
this.supplementalData.put(supplementalData);
|
||||||
this.supplementalData.flip();
|
this.supplementalData.flip();
|
||||||
supplementalData.position(0);
|
supplementalData.position(0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user