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

Commit 9c29f6b2 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "handle empty NAL when looking for HEVC layerId"

parents fc4a1813 c47d1d18
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -5318,7 +5318,9 @@ size_t MPEG4Source::parseNALSize(const uint8_t *data) const {
}

int32_t MPEG4Source::parseHEVCLayerId(const uint8_t *data, size_t size) {
    CHECK(data != nullptr && size >= (mNALLengthSize + 2));
    if (data == nullptr || size < mNALLengthSize + 2) {
        return -1;
    }

    // HEVC NAL-header (16-bit)
    //  1   6      6     3