diff options
Diffstat (limited to 'cmds/stagefright/stagefright.cpp')
-rw-r--r-- | cmds/stagefright/stagefright.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/cmds/stagefright/stagefright.cpp b/cmds/stagefright/stagefright.cpp index 34f0a64..2e0aa9b 100644 --- a/cmds/stagefright/stagefright.cpp +++ b/cmds/stagefright/stagefright.cpp @@ -874,7 +874,7 @@ int main(int argc, char **argv) { CHECK(control->isValid()); SurfaceComposerClient::openGlobalTransaction(); - CHECK_EQ(control->setLayer(30000), (status_t)OK); + CHECK_EQ(control->setLayer(INT_MAX), (status_t)OK); CHECK_EQ(control->show(), (status_t)OK); SurfaceComposerClient::closeGlobalTransaction(); @@ -886,6 +886,10 @@ int main(int argc, char **argv) { sp<SurfaceTexture> texture = new SurfaceTexture(0 /* tex */); gSurface = new SurfaceTextureClient(texture); } + + CHECK_EQ((status_t)OK, + native_window_api_connect( + gSurface.get(), NATIVE_WINDOW_API_MEDIA)); } DataSource::RegisterDefaultSniffers(); @@ -1077,6 +1081,10 @@ int main(int argc, char **argv) { } if ((useSurfaceAlloc || useSurfaceTexAlloc) && !audioOnly) { + CHECK_EQ((status_t)OK, + native_window_api_disconnect( + gSurface.get(), NATIVE_WINDOW_API_MEDIA)); + gSurface.clear(); if (useSurfaceAlloc) { |