mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +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 static final String TAG = "VideoSampleExporter";
|
||||||
private final SingleInputVideoGraph singleInputVideoGraph;
|
private final SingleInputVideoGraph singleInputVideoGraph;
|
||||||
private final EncoderWrapper encoderWrapper;
|
private final EncoderWrapper encoderWrapper;
|
||||||
|
private final DecoderInputBuffer encoderOutputBuffer;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The timestamp of the last buffer processed before {@linkplain
|
* The timestamp of the last buffer processed before {@linkplain
|
||||||
|
|
@ -104,6 +105,9 @@ import org.checkerframework.dataflow.qual.Pure;
|
||||||
transformationRequest,
|
transformationRequest,
|
||||||
fallbackListener);
|
fallbackListener);
|
||||||
|
|
||||||
|
encoderOutputBuffer =
|
||||||
|
new DecoderInputBuffer(DecoderInputBuffer.BUFFER_REPLACEMENT_MODE_DISABLED);
|
||||||
|
|
||||||
boolean isMediaCodecToneMapping =
|
boolean isMediaCodecToneMapping =
|
||||||
encoderWrapper.getHdrModeAfterFallback() == HDR_MODE_TONE_MAP_HDR_TO_SDR_USING_MEDIACODEC
|
encoderWrapper.getHdrModeAfterFallback() == HDR_MODE_TONE_MAP_HDR_TO_SDR_USING_MEDIACODEC
|
||||||
&& ColorInfo.isTransferHdr(decoderInputColor);
|
&& ColorInfo.isTransferHdr(decoderInputColor);
|
||||||
|
|
@ -193,8 +197,6 @@ import org.checkerframework.dataflow.qual.Pure;
|
||||||
@Override
|
@Override
|
||||||
@Nullable
|
@Nullable
|
||||||
protected DecoderInputBuffer getMuxerInputBuffer() throws ExportException {
|
protected DecoderInputBuffer getMuxerInputBuffer() throws ExportException {
|
||||||
DecoderInputBuffer encoderOutputBuffer =
|
|
||||||
new DecoderInputBuffer(DecoderInputBuffer.BUFFER_REPLACEMENT_MODE_DISABLED);
|
|
||||||
encoderOutputBuffer.data = encoderWrapper.getOutputBuffer();
|
encoderOutputBuffer.data = encoderWrapper.getOutputBuffer();
|
||||||
if (encoderOutputBuffer.data == null) {
|
if (encoderOutputBuffer.data == null) {
|
||||||
return null;
|
return null;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue