aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXin Wang <xin1.wang@intel.com>2016-05-21 08:31:10 +0800
committerThe Android Automerger <android-build@android.com>2016-06-03 16:12:35 -0700
commit1aa2377f0cc21cad6d44baf77be410b940a2f30a (patch)
tree06ee9f8ddc725701a3d9d75502e430c689a53868
parent9b61b52a4ba4d0cc2a4a6fe923458c1c426693d0 (diff)
downloadandroid_hardware_intel_common_omx-components-1aa2377f0cc21cad6d44baf77be410b940a2f30a.tar.gz
android_hardware_intel_common_omx-components-1aa2377f0cc21cad6d44baf77be410b940a2f30a.tar.bz2
android_hardware_intel_common_omx-components-1aa2377f0cc21cad6d44baf77be410b940a2f30a.zip
Fixed the frameworks crashing issue when running testOtherVP9ImageReader.
Bug: 27589011 Bug: IMINAN-49451 Fixed by setting back to the default color format, otherwise the Intel specific YV12 format couldn't pass in ACodec::describeDefaultColorFormat, followed by the frameworks crashing later. Change-Id: Ie765a4933620010d3009423e2780fefd559598fa Signed-off-by: Xin Wang <xin1.wang@intel.com> Signed-off-by: Austin Hu <austin.hu@intel.com>
-rw-r--r--videocodec/OMXVideoDecoderVP9Hybrid.cpp18
1 files changed, 13 insertions, 5 deletions
diff --git a/videocodec/OMXVideoDecoderVP9Hybrid.cpp b/videocodec/OMXVideoDecoderVP9Hybrid.cpp
index 4c2b296..1d6b0e1 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;