aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTianmi Chen <tianmi.chen@intel.com>2014-03-31 20:37:00 +0800
committerPatrick Tjin <pattjin@google.com>2014-07-21 22:02:58 -0700
commitf0261dd0810ccec17b536f213c12aad31bcc610e (patch)
tree359c88dd39e7bd01cdacdbb404977ed72f46b87b
parent03118b9de04779e0aca0da6fe6fe5b0b0704a11c (diff)
downloadandroid_hardware_intel_common_omx-components-f0261dd0810ccec17b536f213c12aad31bcc610e.tar.gz
android_hardware_intel_common_omx-components-f0261dd0810ccec17b536f213c12aad31bcc610e.tar.bz2
android_hardware_intel_common_omx-components-f0261dd0810ccec17b536f213c12aad31bcc610e.zip
omx-component: to destory surface before graphic buffers are released
BZ: 183245 To destory surface before graphic buffers are released in case of output port setting changed. Change-Id: I7cbe085bf962a199cf92bf17f1f8544b552d4458 Signed-off-by: Tianmi Chen <tianmi.chen@intel.com>
-rw-r--r--videocodec/OMXVideoDecoderBase.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/videocodec/OMXVideoDecoderBase.cpp b/videocodec/OMXVideoDecoderBase.cpp
index 4815c3e..7766e42 100644
--- a/videocodec/OMXVideoDecoderBase.cpp
+++ b/videocodec/OMXVideoDecoderBase.cpp
@@ -701,6 +701,10 @@ OMX_ERRORTYPE OMXVideoDecoderBase::HandleFormatChange(void) {
this->ports[INPORT_INDEX]->SetPortDefinition(&paramPortDefinitionInput, true);
this->ports[OUTPORT_INDEX]->SetPortDefinition(&paramPortDefinitionOutput, true);
+ if (mWorkingMode == GRAPHICBUFFER_MODE) {
+ // Make sure va_destroySurface is called before graphicbuffer is freed in case of port setting changed
+ mVideoDecoder->freeSurfaceBuffers();
+ }
this->ports[OUTPORT_INDEX]->ReportPortSettingsChanged();
return OMX_ErrorNone;
}