[automerger skipped] c2 vp9, av1: enable P010 only for devices launching with T am: c804bd960c am: 756eb6bac9 -s ours am: 1d1d7e741e -s ours

am skip reason: Merged-In Ib8ccdf8c6073155fd6189c9ed2510d75951dfb75 with SHA-1 c804bd960c is already in history

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

Change-Id: I1ec7bbd2a9b557bd3fe089994e72a50d51aac06e
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;
 }