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

Commit 41244dc1 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Merge SQ1A.220205.002" am: 497bfda9

Original change: https://android-review.googlesource.com/c/platform/frameworks/av/+/1975235

Change-Id: Ied2e7e4f85447a821a92ef7398e1b8031a1c7394
parents 943480e8 497bfda9
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) {