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
This commit is contained in:
parent
3691454b82
commit
fd6012a727
@ -17,7 +17,6 @@ package com.google.android.exoplayer2.audio;
|
|||||||
|
|
||||||
import com.google.android.exoplayer2.C;
|
import com.google.android.exoplayer2.C;
|
||||||
import com.google.android.exoplayer2.Format;
|
import com.google.android.exoplayer2.Format;
|
||||||
import com.google.android.exoplayer2.util.Assertions;
|
|
||||||
import java.nio.ByteBuffer;
|
import java.nio.ByteBuffer;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -81,7 +80,6 @@ import java.nio.ByteBuffer;
|
|||||||
if (outputBuffer == null || outputBuffer.capacity() < resampledSize) {
|
if (outputBuffer == null || outputBuffer.capacity() < resampledSize) {
|
||||||
outputBuffer = ByteBuffer.allocateDirect(resampledSize).order(buffer.order());
|
outputBuffer = ByteBuffer.allocateDirect(resampledSize).order(buffer.order());
|
||||||
} else {
|
} else {
|
||||||
Assertions.checkState(!outputBuffer.hasRemaining());
|
|
||||||
outputBuffer.clear();
|
outputBuffer.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user