From fd6012a72722a42c78cf0742c3986feaf76a8829 Mon Sep 17 00:00:00 2001 From: andrewlewis Date: Tue, 14 Feb 2017 17:04:48 -0800 Subject: [PATCH] Remove outputBuffer assertion in ResamplingBufferProcessor. The outputBuffer is not necessarily empty after a flush, so the assertion could fail in normal usage. The assertion can just be removed as the output buffer is rewritten in full on every call to handleBuffer. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=147541016 --- .../android/exoplayer2/audio/ResamplingBufferProcessor.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/library/src/main/java/com/google/android/exoplayer2/audio/ResamplingBufferProcessor.java b/library/src/main/java/com/google/android/exoplayer2/audio/ResamplingBufferProcessor.java index 4495cfdbee..507cdbcdd1 100644 --- a/library/src/main/java/com/google/android/exoplayer2/audio/ResamplingBufferProcessor.java +++ b/library/src/main/java/com/google/android/exoplayer2/audio/ResamplingBufferProcessor.java @@ -17,7 +17,6 @@ package com.google.android.exoplayer2.audio; import com.google.android.exoplayer2.C; import com.google.android.exoplayer2.Format; -import com.google.android.exoplayer2.util.Assertions; import java.nio.ByteBuffer; /** @@ -81,7 +80,6 @@ import java.nio.ByteBuffer; if (outputBuffer == null || outputBuffer.capacity() < resampledSize) { outputBuffer = ByteBuffer.allocateDirect(resampledSize).order(buffer.order()); } else { - Assertions.checkState(!outputBuffer.hasRemaining()); outputBuffer.clear(); }