am 0d8e85f9: am 77f877f8: Merge "Acodec: reset sideband handle for all non tunneled mode video playback" into lmp-mr1-dev
* commit '0d8e85f929f0257a3af5ec743365b0140b5e75b4':
Acodec: reset sideband handle for all non tunneled mode video playback
diff --git a/media/libstagefright/ACodec.cpp b/media/libstagefright/ACodec.cpp
index 9fc6b23..8642ad5 100644
--- a/media/libstagefright/ACodec.cpp
+++ b/media/libstagefright/ACodec.cpp
@@ -1333,6 +1333,15 @@
ALOGV("Configuring CPU controlled video playback.");
mTunneled = false;
+ // Explicity reset the sideband handle of the window for
+ // non-tunneled video in case the window was previously used
+ // for a tunneled video playback.
+ err = native_window_set_sideband_stream(nativeWindow.get(), NULL);
+ if (err != OK) {
+ ALOGE("set_sideband_stream(NULL) failed! (err %d).", err);
+ return err;
+ }
+
// Always try to enable dynamic output buffers on native surface
err = mOMX->storeMetaDataInBuffers(
mNode, kPortIndexOutput, OMX_TRUE);