title: Android MediaCodec CodecException while configure
body: <p>I receive an exception when trying to configure for a AVC encoder. I need to shutdown and re create the codec when the video stream resolution changes. Does anyone have inputs for the exception below:</p>
  
  <pre><code>10-14 15:10:20.934 E/OMX-VENC(  980): async_venc_message_thread interrupted to be exited
  10-14 15:10:20.944 I/OMX-VENC(  980): Component Deinit
  10-14 15:10:20.944 I/OMX-VENC(  980): Video encode perflock released
  10-14 15:10:20.944 I/ACodec  ( 3824):  [OMX.qcom.video.encoder.avc] Now uninitialized
  10-14 15:10:20.944 I/ACodec  ( 3824):  [] Now kWhatShutdownCompleted event : 7062
  10-14 15:10:20.944 I/MediaCodec( 3824): Codec shutdown complete
  10-14 15:10:20.944 I/ACodec  ( 3824):  [] Now uninitialized
  10-14 15:10:20.944 I/ACodec  ( 3824): [] onAllocateComponent
  10-14 15:10:20.944 I/OMXClient( 3824): Using client-side OMX mux.
  10-14 15:10:20.954 I/OMX-VENC(  980): Video encode perflock acquired,handle=1635
  10-14 15:10:20.954 I/OMX-VENC(  980): Component_init : OMX.qcom.video.encoder.avc : return = 0x0
  10-14 15:10:20.954 I/ACodec  ( 3824): [OMX.qcom.video.encoder.avc] Now Loaded
  10-14 15:10:20.964 W/System.err( 3824): android.media.MediaCodec$CodecException: Error 0xffffec77
  10-14 15:10:20.964 W/System.err( 3824):     at android.media.MediaCodec.native_configure(Native Method)
  10-14 15:10:20.964 W/System.err( 3824):     at android.media.MediaCodec.configure(MediaCodec.java:1778)
  10-14 15:10:20.964 W/System.err( 3824):     at com.slingmedia.stcapture.model.SCCaptureCameraSource.setupVideoCodec(SCCaptureCameraSource.java:1172)
  </code></pre>