OSDN Git Service

Acodec: reset sideband handle for all non tunneled mode video playback
authorRachad <rachad@google.com>
Fri, 30 Jan 2015 03:50:46 +0000 (19:50 -0800)
committerLajos Molnar <lajos@google.com>
Sat, 31 Jan 2015 03:11:27 +0000 (03:11 +0000)
Bug: 19202023
Change-Id: I414847d72a3c9fd79f858c4ee457270ec65470b6

media/libstagefright/ACodec.cpp

index 9b9153b..7994716 100644 (file)
@@ -1334,6 +1334,15 @@ status_t ACodec::configureCodec(
             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);