mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Fix VideoDecoderOutputBuffer supplemental data
The limit of this.supplementalData was not reset. PiperOrigin-RevId: 273515718
This commit is contained in:
parent
a7db26c352
commit
fab2a0d55e
1 changed files with 2 additions and 1 deletions
|
|
@ -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…
Reference in a new issue