From fab2a0d55e32dc05fc7e4eee14b15714b02216d0 Mon Sep 17 00:00:00 2001 From: andrewlewis Date: Tue, 8 Oct 2019 15:33:38 +0100 Subject: [PATCH] Fix VideoDecoderOutputBuffer supplemental data The limit of this.supplementalData was not reset. PiperOrigin-RevId: 273515718 --- .../android/exoplayer2/video/VideoDecoderOutputBuffer.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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);