Increase h.264 buffer size in ShadowMediaCodecConfig

Some test media has samples larger than 100kB

PiperOrigin-RevId: 638598553
This commit is contained in:
ibaker 2024-05-30 03:54:06 -07:00 committed by Copybara-Service
parent 1640becddd
commit 4db9bf92af

View File

@ -250,7 +250,7 @@ public final class ShadowMediaCodecConfig extends ExternalResource {
.build());
// TODO: Update ShadowMediaCodec to consider the MediaFormat.KEY_MAX_INPUT_SIZE value passed
// to configure() so we don't have to specify large buffers here.
int bufferSize = mimeType.equals(MimeTypes.VIDEO_H265) ? 250_000 : 100_000;
int bufferSize = mimeType.equals(MimeTypes.VIDEO_H265) ? 250_000 : 150_000;
ShadowMediaCodec.addDecoder(
codecName,
new ShadowMediaCodec.CodecConfig(