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

Commit c2d73ef0 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 am:...

avc_utils: skip empty NALs from malformed bistreams am: 91fe76a1 am: f79f26d2 am: 2b5d2c4a am: b6e8b6b8 am: e277181b am: 1a9f5250 am: 4bf71072 am: 5337437a am: 4fa55dda am: dda97631
am: e264868e

Change-Id: Iad84f5a31af230aba3862a3a2d19e9427c6c9eaf
parents 5d8c9767 e264868e
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -456,7 +456,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;