aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuanjun Huang <yuanjun.huang@intel.com>2015-02-11 08:51:43 +0800
committerThe Android Automerger <android-build@google.com>2015-02-11 14:34:07 -0800
commit2dc257bd12d2604f5bac67d039e2b7e53c255ac9 (patch)
tree1cead1011eff0d68ed2e3718741a861095af63e6
parentd1e38d914cebbb96a23064d1d364998e47bf978a (diff)
downloadomx-components-android-cts-5.1_r17.tar.gz
(raw data mode). The color format needs to be set to default as non-Intel format. Bug: 19317169 Change-Id: Ia818c667efb1aca450b30adf9be9b4fec15955cc Signed-off-by: Yuanjun Huang <yuanjun.huang@intel.com>
-rw-r--r--videocodec/OMXVideoDecoderBase.cpp19
1 files changed, 14 insertions, 5 deletions
diff --git a/videocodec/OMXVideoDecoderBase.cpp b/videocodec/OMXVideoDecoderBase.cpp
index 6900d5c..7d1d830 100644
--- a/videocodec/OMXVideoDecoderBase.cpp
+++ b/videocodec/OMXVideoDecoderBase.cpp
@@ -884,16 +884,25 @@ OMX_ERRORTYPE OMXVideoDecoderBase::SetNativeBufferModeSpecific(OMX_PTR pStructur
CHECK_TYPE_HEADER(param);
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;
+ // 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;
if (mEnableAdaptivePlayback) {
SetMaxOutputBufferCount(&port_def);