summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2011-03-29 10:00:20 -0700
committerAndreas Huber <andih@google.com>2011-03-29 10:00:20 -0700
commit89c120e7adbe09c6283591789594c5e591aa5032 (patch)
tree91d932dc5b175d223365401e9ebf70bb02391097 /media
parent98442ddd86ea33453c2db10cfbfc310ae49dce8f (diff)
downloadframeworks_av-89c120e7adbe09c6283591789594c5e591aa5032.zip
frameworks_av-89c120e7adbe09c6283591789594c5e591aa5032.tar.gz
frameworks_av-89c120e7adbe09c6283591789594c5e591aa5032.tar.bz2
Surfaceflinger expects rectangles to be specified right/bottom edge exclusive.
Change-Id: Ib493572c614dbb74fa23b13c3e43899e3b31cf0e related-to-bug: 4147205
Diffstat (limited to 'media')
-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 346d0bb..9928f44 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 3e26a95..a70f868 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.