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

Commit 497bfda9 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Merge SQ1A.220205.002"

parents 16f5a450 33a43136
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) {