Fix VideoDecoderOutputBuffer supplemental data

The limit of this.supplementalData was not reset.

PiperOrigin-RevId: 273515718
This commit is contained in:
andrewlewis 2019-10-08 15:33:38 +01:00 committed by Oliver Woodman
parent a7db26c352
commit fab2a0d55e

View File

@ -97,8 +97,9 @@ public class VideoDecoderOutputBuffer extends OutputBuffer {
int size = supplementalData.limit();
if (this.supplementalData == null || this.supplementalData.capacity() < size) {
this.supplementalData = ByteBuffer.allocate(size);
} else {
this.supplementalData.clear();
}
this.supplementalData.position(0);
this.supplementalData.put(supplementalData);
this.supplementalData.flip();
supplementalData.position(0);