summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYi Kong <yikong@google.com>2018-12-06 11:34:42 -0800
committerYi Kong <yikong@google.com>2018-12-06 19:48:32 +0000
commit8937e6c6f42324200e9f793aa2b6c4cefeca3873 (patch)
tree43ff47edf837824f1c0ae9da7a96a9fbb985bdda
parente84b110b6dc165b98487d3513809997e1f24e230 (diff)
downloadmedia-8937e6c6f42324200e9f793aa2b6c4cefeca3873.tar.gz
Fix invalid logical constant creation in sdm845
This code incorrectly uses || to combine a bunch of state constants, fixes constant-logical-operand warning. Test: m checkbuild Change-Id: I51dedf2b34e270550e0e5f97ac30990f9a4669c6
-rw-r--r--mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp b/mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp
index 71db9824..a4f91ece 100644
--- a/mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp
+++ b/mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp
@@ -2983,9 +2983,9 @@ OMX_ERRORTYPE omx_vdec::send_command_proxy(OMX_IN OMX_HANDLETYPE hComp,
/*******************************/
else if (m_state == OMX_StateInvalid) {
/* State Transition from Inavlid to any state */
- if (eState == (OMX_StateLoaded || OMX_StateWaitForResources
- || OMX_StateIdle || OMX_StateExecuting
- || OMX_StatePause || OMX_StateInvalid)) {
+ if (eState == OMX_StateLoaded || eState == OMX_StateWaitForResources ||
+ eState == OMX_StateIdle || eState == OMX_StateExecuting ||
+ eState == OMX_StatePause || eState == OMX_StateInvalid) {
DEBUG_PRINT_ERROR("ERROR::send_command_proxy(): Invalid -->Loaded");
post_event(OMX_EventError,OMX_ErrorInvalidState,\
OMX_COMPONENT_GENERATE_EVENT);