aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormahongpe <hongpeng.ma@intel.com>2015-11-06 00:44:27 +0800
committerThe Android Automerger <android-build@google.com>2015-11-09 17:00:57 -0800
commita2f2b42ced7efa9231d05389d56268e857f906d9 (patch)
tree4ee5893a0368901e9c93c142aed2cd35195c4d22
parent3aa46b0bcd69b855f775a8b1f928776ca0fb35f6 (diff)
downloadandroid_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.cpp3
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(&paramPortDefinitionInput, true);
this->ports[OUTPORT_INDEX]->SetPortDefinition(&paramPortDefinitionOutput, true);
+ ProcessorFlush(INPORT_INDEX);
+
mVideoDecoder->freeSurfaceBuffers();
- ProcessorFlush(INPORT_INDEX);
this->ports[OUTPORT_INDEX]->ReportPortSettingsChanged();
mFormatChanged = false;