mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +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,
|
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++;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue