title: Access crop bounds for decoded video using NDK MediaCodec
body: <p>I am trying to read crop bounds via NDK's MediaCodec API. </p>
  
  <p>I am reading values as below:</p>
  
  <pre><code>AMediaFormat* fmt = initialized();
  if (AMediaFormat_getInt32(fmt, "crop-left", &amp;cropLeft)) {
      LOGI("crop-left: %d", cropLeft);
  }
  </code></pre>
  
  <p>However, I fail to read cropLeft values for various videos that I tried. I have tried to read it after first frame and also once format change is detected.</p>
  
  <p>I have seen similar code being used in <a href="https://github.com/videolan/vlc/blob/master/modules/codec/omxil/mediacodec_ndk.c" rel="nofollow noreferrer">vlc code</a> base.</p>
  
  <p>Looking for what might be potentially wrong here.</p>