diff --git a/library/core/src/main/java/com/google/android/exoplayer2/video/VideoDecoderOutputBuffer.java b/library/core/src/main/java/com/google/android/exoplayer2/video/VideoDecoderOutputBuffer.java index 44ab168505..1289818c02 100644 --- a/library/core/src/main/java/com/google/android/exoplayer2/video/VideoDecoderOutputBuffer.java +++ b/library/core/src/main/java/com/google/android/exoplayer2/video/VideoDecoderOutputBuffer.java @@ -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);