Discard CSD buffers from the raw decoder in passthrough mode.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117129870
This commit is contained in:
olly 2016-03-14 07:04:02 -07:00 committed by Oliver Woodman
parent 835a9e9abe
commit 9f4e46bd3c

View file

@ -330,6 +330,12 @@ public class MediaCodecAudioTrackRenderer extends MediaCodecTrackRenderer implem
protected boolean processOutputBuffer(long positionUs, long elapsedRealtimeUs, MediaCodec codec, protected boolean processOutputBuffer(long positionUs, long elapsedRealtimeUs, MediaCodec codec,
ByteBuffer buffer, MediaCodec.BufferInfo bufferInfo, int bufferIndex, boolean shouldSkip) ByteBuffer buffer, MediaCodec.BufferInfo bufferInfo, int bufferIndex, boolean shouldSkip)
throws ExoPlaybackException { throws ExoPlaybackException {
if (passthroughEnabled && (bufferInfo.flags & MediaCodec.BUFFER_FLAG_CODEC_CONFIG) != 0) {
// Discard output buffers from the passthrough (raw) decoder containing codec specific data.
codec.releaseOutputBuffer(bufferIndex, false);
return true;
}
if (shouldSkip) { if (shouldSkip) {
codec.releaseOutputBuffer(bufferIndex, false); codec.releaseOutputBuffer(bufferIndex, false);
codecCounters.skippedOutputBufferCount++; codecCounters.skippedOutputBufferCount++;