Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bd2ced7f authored by Jongchan Choi's avatar Jongchan Choi Committed by Android Build Cherrypicker Worker
Browse files

Reset staticInfo if static meta fetch fails

Invaild HDR metadata will be fed into encoder, if not reset.

Bug: 262503726
Test: presubmit
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:df54e93d72c611c2f5920b4c88e5006e3662df34)
Merged-In: I33fba8a568cd195dfac0e438f8cae4a411bd04da
Change-Id: I33fba8a568cd195dfac0e438f8cae4a411bd04da
parent 0f6f28be
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1175,6 +1175,11 @@ c2_status_t GetHdrMetadataFromGralloc4Handle(
            err = C2_CORRUPTED;
        }
    }

    if (err != C2_OK) {
        staticInfo->reset();
    }

    if (dynamicInfo) {
        ALOGV("Grabbing dynamic HDR info from gralloc4 metadata");
        dynamicInfo->reset();