aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXin Wang <xin1.wang@intel.com>2016-06-02 20:58:09 +0000
committerandroid-build-merger <android-build-merger@google.com>2016-06-02 20:58:09 +0000
commita08c15060b519cad4eee63454c246e679016158a (patch)
treebb1ab789d4ad47cb9d791bb503b318a8bfe54019
parenta1938fd218e11f20084230f2bd3631ba93e3f950 (diff)
parent0003e4db29ee2b7cfc7546a7e847303b4b8fb81e (diff)
downloadomx-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.cpp18
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;