title: Android 4.1 MediaCodec supported resolutions
body: <p>I'm trying to get Android 4.1's new low-level media-features to work for H.264 encoding on an Asus Transformer TF300T tablet. I'm experiencing some strange behavior when I try to increase the resolution of the codec:</p>
  
  <pre><code>        MediaFormat mediaFormat = MediaFormat.
                                  createVideoFormat("video/mp4v-es", 320, 240); // WORKS
  //      MediaFormat mediaFormat = MediaFormat.
  //                              createVideoFormat("video/mp4v-es", 640, 480); // DOESN'T WORK
  
          mediaFormat.setInteger(MediaFormat.KEY_BIT_RATE, 125000);
          mediaFormat.setInteger(MediaFormat.KEY_FRAME_RATE, 25);
          mediaFormat.setInteger(MediaFormat.KEY_COLOR_FORMAT, MediaCodecInfo.CodecCapabilities.COLOR_FormatYUV420Planar);
          mediaFormat.setInteger(MediaFormat.KEY_I_FRAME_INTERVAL, 5);
          mediaCodec.configure(mediaFormat, null, null, MediaCodec.CONFIGURE_FLAG_ENCODE);
          mediaCodec.start();
  </code></pre>
  
  <p>In the latter case, I'm getting a IllegalStateException when calling <code>mediaCodec.getInputBuffers();</code>. Anyone who has any explanation (or even better: a fix)?</p>
  
  <p>Thanks in advance!</p>