Merge "Merge "don't skip omx video codecs for ATV S and below" into tm-dev am: ad44d1358e am: 9b676b392e" into tm-d1-dev-plus-aosp am: ca18e21da5

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/av/+/18720544

Change-Id: I2918ce79e678e9aeb25fed754e7ec520ce402c6b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/media/libstagefright/HevcUtils.cpp b/media/libstagefright/HevcUtils.cpp
index 5f9c20e..60df162 100644
--- a/media/libstagefright/HevcUtils.cpp
+++ b/media/libstagefright/HevcUtils.cpp
@@ -102,10 +102,11 @@
 static bool findParam(uint32_t key, T *param,
         KeyedVector<uint32_t, uint64_t> &params) {
     CHECK(param);
-    if (params.indexOfKey(key) < 0) {
+    ssize_t index = params.indexOfKey(key);
+    if (index < 0) {
         return false;
     }
-    *param = (T) params[key];
+    *param = (T) params[index];
     return true;
 }