Commit 39d5f143 by andrewlewis Committed by Oliver Woodman

Don't propagate empty supplemental data

PiperOrigin-RevId: 275425267
parent 701b013c
......@@ -97,7 +97,7 @@ public class VideoDecoderOutputBuffer extends OutputBuffer {
long timeUs, @C.VideoOutputMode int mode, @Nullable ByteBuffer supplementalData) {
this.timeUs = timeUs;
this.mode = mode;
if (supplementalData != null) {
if (supplementalData != null && supplementalData.hasRemaining()) {
addFlag(C.BUFFER_FLAG_HAS_SUPPLEMENTAL_DATA);
int size = supplementalData.limit();
if (this.supplementalData == null || this.supplementalData.capacity() < size) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment