Merge "SoftVideoDecoderOMXComponent: max-size can be less than size"
diff --git a/media/libstagefright/omx/SoftVideoDecoderOMXComponent.cpp b/media/libstagefright/omx/SoftVideoDecoderOMXComponent.cpp
index 24ed981..cb811a0 100644
--- a/media/libstagefright/omx/SoftVideoDecoderOMXComponent.cpp
+++ b/media/libstagefright/omx/SoftVideoDecoderOMXComponent.cpp
@@ -182,11 +182,11 @@
uint32_t SoftVideoDecoderOMXComponent::outputBufferWidth() {
- return mIsAdaptive ? mAdaptiveMaxWidth : mWidth;
+ return max(mIsAdaptive ? mAdaptiveMaxWidth : 0, mWidth);
}
uint32_t SoftVideoDecoderOMXComponent::outputBufferHeight() {
- return mIsAdaptive ? mAdaptiveMaxHeight : mHeight;
+ return max(mIsAdaptive ? mAdaptiveMaxHeight : 0, mHeight);
}
void SoftVideoDecoderOMXComponent::handlePortSettingsChange(