summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Andreas Huber <andih@google.com> 2011-03-30 09:12:04 -0700
committer Android (Google) Code Review <android-gerrit@google.com> 2011-03-30 09:12:04 -0700
commitebf6a72b3536646ade389c7afa828e316eb93c21 (patch)
treeb9d3b60e26e569e7da94cf889dbd1d7c7f56747a
parent44e4b99f823a6d6131f94e67389b705d3b124c0a (diff)
parentb13c4a9b6ce6a5a7430a27252058b75b20d0a7fa (diff)
Merge "Surfaceflinger expects rectangles to be specified right/bottom edge exclusive." into honeycomb-mr1
-rw-r--r--media/libstagefright/ACodec.cpp4
-rw-r--r--media/libstagefright/OMXCodec.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/media/libstagefright/ACodec.cpp b/media/libstagefright/ACodec.cpp
index 346d0bb47eac..9928f44459c2 100644
--- a/media/libstagefright/ACodec.cpp
+++ b/media/libstagefright/ACodec.cpp
@@ -1081,8 +1081,8 @@ void ACodec::sendFormatChange() {
android_native_rect_t crop;
crop.left = rect.nLeft;
crop.top = rect.nTop;
- crop.right = rect.nLeft + rect.nWidth - 1;
- crop.bottom = rect.nTop + rect.nHeight - 1;
+ crop.right = rect.nLeft + rect.nWidth;
+ crop.bottom = rect.nTop + rect.nHeight;
CHECK_EQ(0, native_window_set_crop(
mNativeWindow.get(), &crop));
diff --git a/media/libstagefright/OMXCodec.cpp b/media/libstagefright/OMXCodec.cpp
index 3e26a95bb37d..a70f8681d194 100644
--- a/media/libstagefright/OMXCodec.cpp
+++ b/media/libstagefright/OMXCodec.cpp
@@ -2233,8 +2233,8 @@ void OMXCodec::onEvent(OMX_EVENTTYPE event, OMX_U32 data1, OMX_U32 data2) {
android_native_rect_t crop;
crop.left = left;
crop.top = top;
- crop.right = right;
- crop.bottom = bottom;
+ crop.right = right + 1;
+ crop.bottom = bottom + 1;
// We'll ignore any errors here, if the surface is
// already invalid, we'll know soon enough.