mirror of
https://github.com/samsonjs/media.git
synced 2026-04-07 11:35:46 +00:00
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:
parent
835a9e9abe
commit
9f4e46bd3c
1 changed files with 6 additions and 0 deletions
|
|
@ -330,6 +330,12 @@ public class MediaCodecAudioTrackRenderer extends MediaCodecTrackRenderer implem
|
|||
protected boolean processOutputBuffer(long positionUs, long elapsedRealtimeUs, MediaCodec codec,
|
||||
ByteBuffer buffer, MediaCodec.BufferInfo bufferInfo, int bufferIndex, boolean shouldSkip)
|
||||
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) {
|
||||
codec.releaseOutputBuffer(bufferIndex, false);
|
||||
codecCounters.skippedOutputBufferCount++;
|
||||
|
|
|
|||
Loading…
Reference in a new issue