mirror of
https://github.com/samsonjs/media.git
synced 2026-04-08 11:45:51 +00:00
Set the output buffer position/limit only if it's non-null.
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=127196797
This commit is contained in:
parent
d4d1640808
commit
acef34a6f3
1 changed files with 4 additions and 2 deletions
|
|
@ -822,8 +822,10 @@ public abstract class MediaCodecRenderer extends Renderer {
|
|||
// The dequeued buffer is a media buffer. Do some initial setup. The buffer will be
|
||||
// processed by calling processOutputBuffer (possibly multiple times) below.
|
||||
ByteBuffer outputBuffer = outputBuffers[outputIndex];
|
||||
outputBuffer.position(outputBufferInfo.offset);
|
||||
outputBuffer.limit(outputBufferInfo.offset + outputBufferInfo.size);
|
||||
if (outputBuffer != null) {
|
||||
outputBuffer.position(outputBufferInfo.offset);
|
||||
outputBuffer.limit(outputBufferInfo.offset + outputBufferInfo.size);
|
||||
}
|
||||
shouldSkipOutputBuffer = shouldSkipOutputBuffer(outputBufferInfo.presentationTimeUs);
|
||||
}
|
||||
} else if (outputIndex == MediaCodec.INFO_OUTPUT_FORMAT_CHANGED /* (-2) */) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue