mirror of
https://github.com/samsonjs/media.git
synced 2026-03-30 10:15:48 +00:00
Avoid create short lived object
PiperOrigin-RevId: 555204528
This commit is contained in:
parent
3351f0387f
commit
7e12d7619a
1 changed files with 4 additions and 2 deletions
|
|
@ -61,6 +61,7 @@ import org.checkerframework.dataflow.qual.Pure;
|
|||
private static final String TAG = "VideoSampleExporter";
|
||||
private final SingleInputVideoGraph singleInputVideoGraph;
|
||||
private final EncoderWrapper encoderWrapper;
|
||||
private final DecoderInputBuffer encoderOutputBuffer;
|
||||
|
||||
/**
|
||||
* The timestamp of the last buffer processed before {@linkplain
|
||||
|
|
@ -104,6 +105,9 @@ import org.checkerframework.dataflow.qual.Pure;
|
|||
transformationRequest,
|
||||
fallbackListener);
|
||||
|
||||
encoderOutputBuffer =
|
||||
new DecoderInputBuffer(DecoderInputBuffer.BUFFER_REPLACEMENT_MODE_DISABLED);
|
||||
|
||||
boolean isMediaCodecToneMapping =
|
||||
encoderWrapper.getHdrModeAfterFallback() == HDR_MODE_TONE_MAP_HDR_TO_SDR_USING_MEDIACODEC
|
||||
&& ColorInfo.isTransferHdr(decoderInputColor);
|
||||
|
|
@ -193,8 +197,6 @@ import org.checkerframework.dataflow.qual.Pure;
|
|||
@Override
|
||||
@Nullable
|
||||
protected DecoderInputBuffer getMuxerInputBuffer() throws ExportException {
|
||||
DecoderInputBuffer encoderOutputBuffer =
|
||||
new DecoderInputBuffer(DecoderInputBuffer.BUFFER_REPLACEMENT_MODE_DISABLED);
|
||||
encoderOutputBuffer.data = encoderWrapper.getOutputBuffer();
|
||||
if (encoderOutputBuffer.data == null) {
|
||||
return null;
|
||||
|
|
|
|||
Loading…
Reference in a new issue