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

Commit f79f26d2 authored by Robert Shih's avatar Robert Shih Committed by android-build-merger
Browse files

avc_utils: skip empty NALs from malformed bistreams

am: 91fe76a1

Change-Id: I4fc3e40dbfe2839611265ba178a9f35e05bcc28a
parents 7da83aad 91fe76a1
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -414,7 +414,10 @@ bool IsIDR(const sp<ABuffer> &buffer) {
    const uint8_t *nalStart;
    size_t nalSize;
    while (getNextNALUnit(&data, &size, &nalStart, &nalSize, true) == OK) {
        CHECK_GT(nalSize, 0u);
        if (nalSize == 0u) {
            ALOGW("skipping empty nal unit from potentially malformed bitstream");
            continue;
        }

        unsigned nalType = nalStart[0] & 0x1f;