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

Commit ec8ee993 authored by Santiago Seifert's avatar Santiago Seifert
Browse files

Avoid logging when no HDR static info is provided

Bug: 201541781
Change-Id: Ie33217e83dbfb92c9d06658fb8838e9d8a51f98b
Test: atest CtsMediaMuxerTestCases
parent bdb61e90
Loading
Loading
Loading
Loading
+40 −37
Original line number Diff line number Diff line
@@ -4482,7 +4482,13 @@ void MPEG4Writer::Track::writeMdcvAndClliBoxes() {
    size_t size;
    bool found =
            meta->findData(kKeyHdrStaticInfo, &type, reinterpret_cast<const void**>(&data), &size);
    if (found && size == 25) {
    if (!found) {
        return; // Nothing to encode.
    }
    if (size != 25) {
        ALOGW("Ignoring HDR static info with unexpected size %d", (int)size);
        return;
    }
    uint16_t displayPrimariesRX = U16LE_AT(&data[1]);
    uint16_t displayPrimariesRY = U16LE_AT(&data[3]);

@@ -4518,9 +4524,6 @@ void MPEG4Writer::Track::writeMdcvAndClliBoxes() {
    mOwner->writeInt16(maxContentLightLevel);
    mOwner->writeInt16(maxPicAverageLightLevel);
    mOwner->endBox();  // clli.
    } else {
        ALOGW("Ignoring HDR static info with unexpected size %d", (int)size);
    }
}

void MPEG4Writer::Track::writeAudioFourCCBox() {