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

Commit d3c372d5 authored by Yichi Chen's avatar Yichi Chen Committed by Android (Google) Code Review
Browse files

Merge "CCodec: Validate hdr10PlusInfo with the flexCount" into rvc-dev

parents d36b1491 54be23c1
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -732,6 +732,9 @@ status_t CCodecBufferChannel::renderOutputBuffer(
    std::shared_ptr<const C2StreamHdr10PlusInfo::output> hdr10PlusInfo =
        std::static_pointer_cast<const C2StreamHdr10PlusInfo::output>(
                c2Buffer->getInfo(C2StreamHdr10PlusInfo::output::PARAM_TYPE));
    if (hdr10PlusInfo && hdr10PlusInfo->flexCount() == 0) {
        hdr10PlusInfo.reset();
    }

    {
        Mutexed<OutputSurface>::Locked output(mOutputSurface);
@@ -783,7 +786,7 @@ status_t CCodecBufferChannel::renderOutputBuffer(
                    .maxLuminance = hdrStaticInfo->mastering.maxLuminance,
                    .minLuminance = hdrStaticInfo->mastering.minLuminance,
                };
                hdr.validTypes = HdrMetadata::SMPTE2086;
                hdr.validTypes |= HdrMetadata::SMPTE2086;
                hdr.smpte2086 = smpte2086_meta;
            }
            // If the content light level fields are 0, do not use them, it