title: How to set encoder buffer size created by MediaCodec
body: <p>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 <code>inputBuffer.put</code> with <code>buffer overflow</code>. So I was about to set the input buffer to 460800. The API I could find is <code>BufferInfo.set</code>. However, I cannot find a way to attach this setting to the encoder. Could someone help? Thanks!!!    </p>
  
  <pre><code>encoder = MediaCodec.createByCodecName(codecInfo.getName());
  ByteBuffer[] inputBuffers = encoder.getInputBuffers();
  if (inputBufferIndex &gt;= 0) {
      ByteBuffer inputBuffer = inputBuffers[inputBufferIndex];
      inputBuffer.clear();
      inputBuffer.put(input);
  encoder.queueInputBuffer(inputBufferIndex, 0, input.length, 0, 0);}
  </code></pre>