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

Commit 6b85f1ee authored by Taehwan Kim's avatar Taehwan Kim
Browse files

codec2: check a validation of HDR static info



CCodecConfig always adds C2StreamHdrStaticInfo::output as a local param
in DECODER case.
it causes CCodecBufferChannel misunderstand
although HDR static info is invalid and,
then, invalid info is set to gralloc via SetHdrMetadataToGralloc4Handle().

so, check a validation of HDR static info and
clear hdrStaticInfo when it is invalid.

Change-Id: I713aee3ee9c97e17c92a4c3790caad9c83fe382f
Signed-off-by: default avatarTaehwan Kim <t_h.kim@samsung.com>
parent ba2bc909
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -924,6 +924,11 @@ status_t CCodecBufferChannel::renderOutputBuffer(
                hdr.validTypes |= HdrMetadata::CTA861_3;
                hdr.cta8613 = cta861_meta;
            }

            // does not have valid info
            if (!(hdr.validTypes & (HdrMetadata::SMPTE2086 | HdrMetadata::CTA861_3))) {
                hdrStaticInfo.reset();
            }
        }
        if (hdrDynamicInfo
                && hdrDynamicInfo->m.type_ == C2Config::HDR_DYNAMIC_METADATA_TYPE_SMPTE_2094_40) {