              && portIndex == kPortIndexInput) {
          err = mOMX->storeMetaDataInBuffers(mNode, kPortIndexInput, OMX_TRUE);
          if (err != OK) {
-@@ -2075,7 +2214,11 @@ status_t OMXCodec::allocateOutputBuffersFromNativeWindow() {
+@@ -2075,7 +2120,11 @@ status_t OMXCodec::allocateOutputBuffersFromNativeWindow() {
              mNativeWindow.get(),
              def.format.video.nFrameWidth,
              def.format.video.nFrameHeight,

         // notify client processes of the new input creation
         thread->audioConfigChanged_l(AudioSystem::INPUT_OPENED);
         return id;
@@ -2131,10 +2224,45 @@ audio_io_handle_t AudioFlinger::openInput(audio_module_handle_t module,
     return 0;
 }
 

 
     if (err != 0) {
         ALOGE("native_window_set_buffers_geometry failed: %s (%d)",
diff --git a/frameworks/av/media/libstagefright/CameraSource.cpp b/frameworks/av/media/libstagefright/CameraSource.cpp
index ce045d7..8c01ac2 100644
--- a/frameworks/av/media/libstagefright/CameraSource.cpp
