How to set encoder buffer size created by MediaCodec
问题 I am trying to use Nexus to test encoding with Mediacodec APIs. I can see the inputBuffers provided by the encoder is 119040 (by logging inputBuffers.capacity). But the size of the frame, i.e. input, is 460800. I got error message at inputBuffer.put with buffer overflow . So I was about to set the input buffer to 460800. The API I could find is BufferInfo.set . However, I cannot find a way to attach this setting to the encoder. Could someone help? Thanks!!! encoder = MediaCodec