fix send null static meta to VENC when HDR Editing

The data flow is VDEC->GPU->VENC when HDR Editing, as excepted,
after passing through GPU, the static meta will be discarded.
But VENC received NULL static meta.

we have found a bug in the file Codec2Buffer.cpp.
Within the function GetHdrMetaDataFromGralloc4Handle, if
smpte2086 is false, the err should be set to C2_CORRUPTED.
So the static info reset will be called to avoid send null
static meta to VENC. This is how it's done in Android 14.

Bug:
Test: video record and HDR editing test.

Change-Id: I9734fae0ef739b443f9c1b932900318600a32169
diff --git a/media/codec2/sfplugin/Codec2Buffer.cpp b/media/codec2/sfplugin/Codec2Buffer.cpp
index 9c514f2..e626160 100644
--- a/media/codec2/sfplugin/Codec2Buffer.cpp
+++ b/media/codec2/sfplugin/Codec2Buffer.cpp
@@ -1137,7 +1137,7 @@
 
         std::optional<Smpte2086> smpte2086;
         status_t status = mapper.getSmpte2086(buffer.get(), &smpte2086);
-        if (status != OK) {
+        if (status != OK || !smpte2086) {
             err = C2_CORRUPTED;
         } else {
             if (smpte2086) {
@@ -1157,7 +1157,7 @@
 
         std::optional<Cta861_3> cta861_3;
         status = mapper.getCta861_3(buffer.get(), &cta861_3);
-        if (status != OK) {
+        if (status != OK || !cta861_3) {
             err = C2_CORRUPTED;
         } else {
             if (cta861_3) {
@@ -1176,7 +1176,7 @@
         dynamicInfo->reset();
         std::optional<std::vector<uint8_t>> vec;
         status_t status = mapper.getSmpte2094_40(buffer.get(), &vec);
-        if (status != OK) {
+        if (status != OK || !vec) {
             dynamicInfo->reset();
             err = C2_CORRUPTED;
         } else {