diff options
author | Xin Wang <xin1.wang@intel.com> | 2016-06-02 20:58:09 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2016-06-02 20:58:09 +0000 |
commit | a08c15060b519cad4eee63454c246e679016158a (patch) | |
tree | bb1ab789d4ad47cb9d791bb503b318a8bfe54019 | |
parent | a1938fd218e11f20084230f2bd3631ba93e3f950 (diff) | |
parent | 0003e4db29ee2b7cfc7546a7e847303b4b8fb81e (diff) | |
download | omx-components-a08c15060b519cad4eee63454c246e679016158a.tar.gz |
Fixed the frameworks crashing issue when running testOtherVP9ImageReader.
am: 0003e4db29
* commit '0003e4db29ee2b7cfc7546a7e847303b4b8fb81e':
Fixed the frameworks crashing issue when running testOtherVP9ImageReader.
Change-Id: I55f3a4431053d39b9ec3f7e67fee207a3c4c744b
-rw-r--r-- | videocodec/OMXVideoDecoderVP9Hybrid.cpp | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/videocodec/OMXVideoDecoderVP9Hybrid.cpp b/videocodec/OMXVideoDecoderVP9Hybrid.cpp index 79f39f2..8c346cf 100644 --- a/videocodec/OMXVideoDecoderVP9Hybrid.cpp +++ b/videocodec/OMXVideoDecoderVP9Hybrid.cpp @@ -625,17 +625,25 @@ OMX_ERRORTYPE OMXVideoDecoderVP9Hybrid::SetNativeBufferModeSpecific(OMX_PTR pStr CHECK_PORT_INDEX_RANGE(param); CHECK_SET_PARAM_STATE(); + PortVideo *port = NULL; + port = static_cast<PortVideo *>(this->ports[OUTPORT_INDEX]); + OMX_PARAM_PORTDEFINITIONTYPE port_def; + memcpy(&port_def,port->GetPortDefinition(),sizeof(port_def)); + if (!param->enable) { mWorkingMode = RAWDATA_MODE; LOGI("Raw data mode is used"); + // If it is fallback from native mode the color format has been + // already set to INTEL format. + // We need to set back the default color format and Native stuff. + port_def.format.video.eColorFormat = OMX_COLOR_FormatYUV420SemiPlanar; + port_def.format.video.pNativeRender = NULL; + port_def.format.video.pNativeWindow = NULL; + port->SetPortDefinition(&port_def,true); return OMX_ErrorNone; } - mWorkingMode = GRAPHICBUFFER_MODE; - PortVideo *port = NULL; - port = static_cast<PortVideo *>(this->ports[OUTPORT_INDEX]); - OMX_PARAM_PORTDEFINITIONTYPE port_def; - memcpy(&port_def,port->GetPortDefinition(),sizeof(port_def)); + mWorkingMode = GRAPHICBUFFER_MODE; port_def.nBufferCountMin = mNativeBufferCount - 4; port_def.nBufferCountActual = mNativeBufferCount; port_def.format.video.cMIMEType = (OMX_STRING)VA_VED_RAW_MIME_TYPE; |