Merge "media/codec2: reserve a slot for failed query results" into qt-dev
diff --git a/media/codec2/vndk/util/C2InterfaceHelper.cpp b/media/codec2/vndk/util/C2InterfaceHelper.cpp
index 3bd709c..9eb52d2 100644
--- a/media/codec2/vndk/util/C2InterfaceHelper.cpp
+++ b/media/codec2/vndk/util/C2InterfaceHelper.cpp
@@ -794,9 +794,11 @@
             if (p != nullptr) {
                 heapParams->push_back(std::move(p));
             } else {
+                heapParams->push_back(nullptr);
                 paramNoMemory = true;
             }
         } else {
+            heapParams->push_back(nullptr);
             paramNotFound = true;
         }
     }