summaryrefslogtreecommitdiff
path: root/mm-video-v4l2
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@quicinc.com>2017-07-10 18:52:44 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2017-07-10 18:52:44 -0700
commit2df5ccdcab8bd018cfd07c258f3b02e7f2334fb0 (patch)
tree6b27dc425d0bf56c3242e4c2a81212e979fd1ed2 /mm-video-v4l2
parentcb2fe97923de24208e2b577bc12ebaf7a6ab1431 (diff)
parente2073d1142bef811b512f1422c75caef15896176 (diff)
downloadmedia-2df5ccdcab8bd018cfd07c258f3b02e7f2334fb0.tar.gz
Merge "mm-video-v4l2: venc: WA: ignore colorspace set by client when executing"
Diffstat (limited to 'mm-video-v4l2')
-rw-r--r--mm-video-v4l2/vidc/venc/src/omx_video_encoder.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/mm-video-v4l2/vidc/venc/src/omx_video_encoder.cpp b/mm-video-v4l2/vidc/venc/src/omx_video_encoder.cpp
index 0aa45e8e..71c36c66 100644
--- a/mm-video-v4l2/vidc/venc/src/omx_video_encoder.cpp
+++ b/mm-video-v4l2/vidc/venc/src/omx_video_encoder.cpp
@@ -1897,6 +1897,17 @@ OMX_ERRORTYPE omx_venc::set_config(OMX_IN OMX_HANDLETYPE hComp,
VALIDATE_OMX_PARAM_DATA(configData, DescribeColorAspectsParams);
DescribeColorAspectsParams *params = (DescribeColorAspectsParams *)configData;
print_debug_color_aspects(&(params->sAspects), "set_config");
+
+ // WA: Android client does not set the correct color-aspects (from dataspace).
+ // Such a dataspace change is detected and set while in executing. This leads to
+ // a race condition where client is trying to set (wrong) color and component trying
+ // to set (right) color from ETB.
+ // Hence ignore this config in Executing state till the framework starts setting right color.
+ if (m_state == OMX_StateExecuting) {
+ DEBUG_PRINT_HIGH("Ignoring ColorSpace setting in Executing state");
+ return OMX_ErrorUnsupportedSetting;
+ }
+
if (!handle->venc_set_config(configData, (OMX_INDEXTYPE)OMX_QTIIndexConfigDescribeColorAspects)) {
DEBUG_PRINT_ERROR("Failed to set OMX_QTIIndexConfigDescribeColorAspects");
return OMX_ErrorUnsupportedSetting;