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

Commit 33a43136 authored by Xin Li's avatar Xin Li
Browse files

Merge SQ1A.220205.002

Bug: 213904741
Merged-In: Ie8d6792ff391d36d0e199a1d7f649e6081c1e8ac
Change-Id: Idf809bd601ee2b6811d26d8950ae6ca4d30a1cf3
parents 16f5a450 c8e6eb20
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@
#include <variant>

#include <binder/Parcel.h>
#include <log/log.h>
#include <utils/Errors.h>
#include <utils/Timers.h> // nsecs_t

@@ -469,16 +470,16 @@ protected:
    template <> // static
    status_t extract(std::string *val, const char **bufferpptr, const char *bufferptrmax) {
        const char *ptr = *bufferpptr;
        while (*ptr != 0) {
        do {
            if (ptr >= bufferptrmax) {
                ALOGE("%s: buffer exceeded", __func__);
                android_errorWriteLog(0x534e4554, "204445255");
                return BAD_VALUE;
            }
            ++ptr;
        }
        const size_t size = (ptr - *bufferpptr) + 1;
        } while (*ptr++ != 0);
        // ptr is terminator+1, == bufferptrmax if we finished entire buffer
        *val = *bufferpptr;
        *bufferpptr += size;
        *bufferpptr = ptr;
        return NO_ERROR;
    }
    template <> // static
+4 −0
Original line number Diff line number Diff line
@@ -295,6 +295,10 @@ ARTPAssembler::AssemblyStatus AAVCAssembler::addNALUnit(
}

void AAVCAssembler::checkSpsUpdated(const sp<ABuffer> &buffer) {
    if (buffer->size() == 0) {
        android_errorWriteLog(0x534e4554, "204077881");
        return;
    }
    const uint8_t *data = buffer->data();
    unsigned nalType = data[0] & 0x1f;
    if (nalType == 0x7) {