mirror of
https://github.com/androidx/media.git
synced 2025-05-08 16:10:38 +08:00
Transformer: set audio decoder max input size
#minor-release PiperOrigin-RevId: 354949992
This commit is contained in:
parent
1ec326438f
commit
46b8b069ca
@ -77,6 +77,8 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
|
|||||||
MediaFormat mediaFormat =
|
MediaFormat mediaFormat =
|
||||||
MediaFormat.createAudioFormat(
|
MediaFormat.createAudioFormat(
|
||||||
format.sampleMimeType, format.sampleRate, format.channelCount);
|
format.sampleMimeType, format.sampleRate, format.channelCount);
|
||||||
|
MediaFormatUtil.maybeSetInteger(
|
||||||
|
mediaFormat, MediaFormat.KEY_MAX_INPUT_SIZE, format.maxInputSize);
|
||||||
MediaFormatUtil.setCsdBuffers(mediaFormat, format.initializationData);
|
MediaFormatUtil.setCsdBuffers(mediaFormat, format.initializationData);
|
||||||
adapter = new SynchronousMediaCodecAdapter.Factory().createAdapter(decoder);
|
adapter = new SynchronousMediaCodecAdapter.Factory().createAdapter(decoder);
|
||||||
adapter.configure(mediaFormat, /* surface= */ null, /* crypto= */ null, /* flags= */ 0);
|
adapter.configure(mediaFormat, /* surface= */ null, /* crypto= */ null, /* flags= */ 0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user