summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/ACodec.cpp
diff options
context:
space:
mode:
authorLajos Molnar <lajos@google.com>2015-05-06 12:02:56 -0700
committerLajos Molnar <lajos@google.com>2015-05-07 11:46:15 -0700
commit484979b1ab25aa41f503bd846323ab93b46d37e5 (patch)
tree22b238e766c3e9deec52f1354b0dbca6158c217f /media/libstagefright/ACodec.cpp
parentb2d0b487efd40700199852c9a18b369b1651f15b (diff)
downloadframeworks_av-484979b1ab25aa41f503bd846323ab93b46d37e5.zip
frameworks_av-484979b1ab25aa41f503bd846323ab93b46d37e5.tar.gz
frameworks_av-484979b1ab25aa41f503bd846323ab93b46d37e5.tar.bz2
ACodec: blank surface when switching to another surface
Bug: 20885565 Change-Id: I9b0d279724aab24e0a270770258716d115ef15bc
Diffstat (limited to 'media/libstagefright/ACodec.cpp')
-rw-r--r--media/libstagefright/ACodec.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/media/libstagefright/ACodec.cpp b/media/libstagefright/ACodec.cpp
index 134bdae..5475a4a 100644
--- a/media/libstagefright/ACodec.cpp
+++ b/media/libstagefright/ACodec.cpp
@@ -651,6 +651,11 @@ status_t ACodec::handleSetSurface(const sp<Surface> &surface) {
(void)surface->getIGraphicBufferProducer()->allowAllocation(false);
}
+ // push blank buffers to previous window if requested
+ if (mFlags & kFlagPushBlankBuffersToNativeWindowOnShutdown) {
+ pushBlankBuffersToNativeWindow(mNativeWindow.get());
+ }
+
mNativeWindow = nativeWindow;
return OK;
}