summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/OMXCodec.cpp
diff options
context:
space:
mode:
authorJamie Gennis <jgennis@google.com>2012-06-13 19:13:16 -0700
committerJamie Gennis <jgennis@google.com>2012-06-14 11:42:29 -0700
commit1d5ac80d0c6d3deabcc9e9b4abc9e3ef536aeb27 (patch)
tree96e6e894350c7b69bd4bc79f5f1ce129430c2004 /media/libstagefright/OMXCodec.cpp
parent82233b4b5bee06f11618a558ae465abbfdedfd6e (diff)
downloadframeworks_av-1d5ac80d0c6d3deabcc9e9b4abc9e3ef536aeb27.zip
frameworks_av-1d5ac80d0c6d3deabcc9e9b4abc9e3ef536aeb27.tar.gz
frameworks_av-1d5ac80d0c6d3deabcc9e9b4abc9e3ef536aeb27.tar.bz2
stagefright: set scaling mode for blank frames
This change sets the ANativeWindow scaling mode before pushing the blank frames during decoder tear down. Bug: 6603254 Change-Id: Ic64011645e2d3671b4a8d302ac7f39e6fd3affcd
Diffstat (limited to 'media/libstagefright/OMXCodec.cpp')
-rwxr-xr-xmedia/libstagefright/OMXCodec.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/media/libstagefright/OMXCodec.cpp b/media/libstagefright/OMXCodec.cpp
index 7fb395e..fde7ebf 100755
--- a/media/libstagefright/OMXCodec.cpp
+++ b/media/libstagefright/OMXCodec.cpp
@@ -1921,6 +1921,14 @@ status_t OMXCodec::pushBlankBuffersToNativeWindow() {
goto error;
}
+ err = native_window_set_scaling_mode(mNativeWindow.get(),
+ NATIVE_WINDOW_SCALING_MODE_SCALE_TO_WINDOW);
+ if (err != OK) {
+ ALOGE("error pushing blank frames: set_scaling_mode failed: %s (%d)",
+ strerror(-err), -err);
+ goto error;
+ }
+
err = mNativeWindow->query(mNativeWindow.get(),
NATIVE_WINDOW_MIN_UNDEQUEUED_BUFFERS, &minUndequeuedBufs);
if (err != NO_ERROR) {