summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/omx
diff options
context:
space:
mode:
authorRonghua Wu <ronghuawu@google.com>2014-09-24 14:55:23 -0700
committerRonghua Wu <ronghuawu@google.com>2014-09-24 16:44:15 -0700
commitd5a2f55034022f2d0425fa0701894d0c4787b726 (patch)
tree083ced109691ba794c8c4e595cc55e5f57314a96 /media/libstagefright/omx
parent80ec934ae7d4e3a78af87554fdb77a58f6386ba0 (diff)
downloadframeworks_av-d5a2f55034022f2d0425fa0701894d0c4787b726.zip
frameworks_av-d5a2f55034022f2d0425fa0701894d0c4787b726.tar.gz
frameworks_av-d5a2f55034022f2d0425fa0701894d0c4787b726.tar.bz2
stagefright: fix cropping handling for SoftAVC and SoftMEPEG4.
Bug: 17326758 Change-Id: I9b0c281d92cf1803e275b1768e9edab9404ea577
Diffstat (limited to 'media/libstagefright/omx')
-rw-r--r--media/libstagefright/omx/SoftVideoDecoderOMXComponent.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/media/libstagefright/omx/SoftVideoDecoderOMXComponent.cpp b/media/libstagefright/omx/SoftVideoDecoderOMXComponent.cpp
index 5853469..a7f7a07 100644
--- a/media/libstagefright/omx/SoftVideoDecoderOMXComponent.cpp
+++ b/media/libstagefright/omx/SoftVideoDecoderOMXComponent.cpp
@@ -160,15 +160,17 @@ uint32_t SoftVideoDecoderOMXComponent::outputBufferHeight() {
}
void SoftVideoDecoderOMXComponent::handlePortSettingsChange(
- bool *portWillReset, uint32_t width, uint32_t height, bool cropChanged, bool fakeStride) {
+ bool *portWillReset, uint32_t width, uint32_t height,
+ CropSettingsMode cropSettingsMode, bool fakeStride) {
*portWillReset = false;
bool sizeChanged = (width != mWidth || height != mHeight);
+ bool updateCrop = (cropSettingsMode == kCropUnSet);
+ bool cropChanged = (cropSettingsMode == kCropChanged);
if (sizeChanged || cropChanged) {
mWidth = width;
mHeight = height;
- bool updateCrop = !cropChanged;
if ((sizeChanged && !mIsAdaptive)
|| width > mAdaptiveMaxWidth
|| height > mAdaptiveMaxHeight) {