From 2c8fec10807dc50c2d65d250e7a9157580f7094c Mon Sep 17 00:00:00 2001 From: Robert Shih Date: Wed, 5 Apr 2017 11:19:28 -0700 Subject: [PATCH] omx node: patch err code to preserve API contract Bug: 36789323 Change-Id: Ie1d8dde5e4df8f5f4061cba7b20e1732b1466235 Test: adb shell am instrument -e size small \ -w android.media.cts/android.support.test.runner.AndroidJUnitRunner --- media/libstagefright/omx/OMXNodeInstance.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/media/libstagefright/omx/OMXNodeInstance.cpp b/media/libstagefright/omx/OMXNodeInstance.cpp index 39ed7593cb..807c2ea2fc 100644 --- a/media/libstagefright/omx/OMXNodeInstance.cpp +++ b/media/libstagefright/omx/OMXNodeInstance.cpp @@ -902,6 +902,9 @@ status_t OMXNodeInstance::storeMetaDataInBuffers_l( ? kMetadataBufferTypeGrallocSource : requestedType; err = OMX_SetParameter(mHandle, index, ¶ms); } + if (err == OMX_ErrorBadParameter) { + err = OMX_ErrorUnsupportedIndex; + } } // don't log loud error if component does not support metadata mode on the output -- 2.11.0