diff options
Diffstat (limited to 'media/libstagefright/codecs/m4v_h263/dec')
-rw-r--r-- | media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp b/media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp index 5b2ab84..d98fa80 100644 --- a/media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp +++ b/media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp @@ -295,19 +295,23 @@ bool SoftMPEG4::handlePortSettingsChange() { ALOGV("disp_width = %d, disp_height = %d, buf_width = %d, buf_height = %d", disp_width, disp_height, buf_width, buf_height); - bool cropChanged = false; - if (mCropWidth != disp_width || mCropHeight != disp_height) { - mCropLeft = 0; - mCropTop = 0; - mCropWidth = disp_width; - mCropHeight = disp_height; - cropChanged = true; + CropSettingsMode cropSettingsMode = kCropUnSet; + if (disp_width != buf_width || disp_height != buf_height) { + cropSettingsMode = kCropSet; + + if (mCropWidth != disp_width || mCropHeight != disp_height) { + mCropLeft = 0; + mCropTop = 0; + mCropWidth = disp_width; + mCropHeight = disp_height; + cropSettingsMode = kCropChanged; + } } bool portWillReset = false; const bool fakeStride = true; SoftVideoDecoderOMXComponent::handlePortSettingsChange( - &portWillReset, buf_width, buf_height, cropChanged, fakeStride); + &portWillReset, buf_width, buf_height, cropSettingsMode, fakeStride); if (portWillReset) { if (mMode == MODE_H263) { PVCleanUpVideoDecoder(mHandle); |