diff options
author | mahongpe <hongpeng.ma@intel.com> | 2015-11-06 00:44:27 +0800 |
---|---|---|
committer | The Android Automerger <android-build@google.com> | 2015-11-09 17:00:57 -0800 |
commit | a2f2b42ced7efa9231d05389d56268e857f906d9 (patch) | |
tree | 4ee5893a0368901e9c93c142aed2cd35195c4d22 | |
parent | 3aa46b0bcd69b855f775a8b1f928776ca0fb35f6 (diff) | |
download | android_hardware_intel_common_omx-components-a2f2b42ced7efa9231d05389d56268e857f906d9.tar.gz android_hardware_intel_common_omx-components-a2f2b42ced7efa9231d05389d56268e857f906d9.tar.bz2 android_hardware_intel_common_omx-components-a2f2b42ced7efa9231d05389d56268e857f906d9.zip |
fix random SEGV issue which is caused by wild pointer in libmix
When resolution changes, we should flush video video pipeline at
first, then free surface buffers.
Bug: 23160948
Change-Id: I84782d886d8a484c2131d0b3f529f82b9c6fd8c9
Signed-off-by: mahongpe <hongpeng.ma@intel.com>
-rw-r--r-- | videocodec/OMXVideoDecoderBase.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/videocodec/OMXVideoDecoderBase.cpp b/videocodec/OMXVideoDecoderBase.cpp index 6270cea..975ac4c 100644 --- a/videocodec/OMXVideoDecoderBase.cpp +++ b/videocodec/OMXVideoDecoderBase.cpp @@ -734,9 +734,10 @@ OMX_ERRORTYPE OMXVideoDecoderBase::HandleFormatChange(void) { this->ports[INPORT_INDEX]->SetPortDefinition(¶mPortDefinitionInput, true); this->ports[OUTPORT_INDEX]->SetPortDefinition(¶mPortDefinitionOutput, true); + ProcessorFlush(INPORT_INDEX); + mVideoDecoder->freeSurfaceBuffers(); - ProcessorFlush(INPORT_INDEX); this->ports[OUTPORT_INDEX]->ReportPortSettingsChanged(); mFormatChanged = false; |