title: Video decoder configure
body: <p>I am writing a app which decodes video samples and plays decodes samples. For this i am using MediaExtractor API. While configuring decoder i am getting error. Here is my log</p>
  
  <pre><code>01-08 11:46:50.225: E/ACodec(23085): [OMX.qcom.video.decoder.avc] configureCodec returning error -2147483648
  01-08 11:46:50.225: A/MediaCodec(23085): frameworks/av/media/libstagefright/MediaCodec.cpp:743 CHECK_EQ( mState,INITIALIZED) failed: 3 vs. 2
  01-08 11:46:50.225: A/libc(23085): Fatal signal 11 (SIGSEGV) at 0xdeadbaad (code=1), thread 23136 (MediaCodec_loop)
  01-08 11:46:50.225: I/OMXClient(23085): Using client-side OMX mux.
  01-08 11:46:50.225: E/ACodec(23085): Unable to instantiate a decoder for type 'video/avc'.
  01-08 11:46:50.225: A/ACodec(23085): frameworks/av/media/libstagefright/ACodec.cpp:3302 CHECK(mCodec-&gt;mNode != NULL) failed.
  01-08 11:46:50.225: A/libc(23085): Fatal signal 11 (SIGSEGV) at 0xdeadbaad (code=1), thread 23137 (CodecLooper)
  </code></pre>
  
  <p>And here is my code</p>
  
  <pre><code>    for (int i = 0; i &lt; videoExtractor.getTrackCount(); i++) {
                      MediaFormat format = videoExtractor.getTrackFormat(i);
                      String mime = format.getString(MediaFormat.KEY_MIME);
                      if (mime.startsWith("video/")) {
                          videoExtractor.selectTrack(i);
                          videoExtractorForSeek.selectTrack(i);
                          videoDecoder = MediaCodec.createDecoderByType(mime);
  //error is in below line
                          videoDecoder.configure(format, surface, null, 0);
                          break;            
                      }
                  }
  </code></pre>
  
  <p>This code working in android version 4.2 and above. and failing in 4.1.2</p>