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

Commit c4022797 authored by Ray Essick's avatar Ray Essick
Browse files

Gracefully handle missing format in pss processing

Bug: 243222985
Test: re-fuzz
Change-Id: I217fe83e11b6fa75993afa180bce39c07921dd45
parent 05e616ca
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -125,6 +125,7 @@ EXPORT
AMediaFormat* AMediaExtractor_getFileFormat(AMediaExtractor *mData) {
    sp<AMessage> format;
    mData->mImpl->getFileFormat(&format);
    // ignore any error, we want to return the empty format
    return AMediaFormat_fromMsg(&format);
}

@@ -247,7 +248,10 @@ PsshInfo* AMediaExtractor_getPsshInfo(AMediaExtractor *ex) {
    }

    sp<AMessage> format;
    ex->mImpl->getFileFormat(&format);
    if (ex->mImpl->getFileFormat(&format) != OK) {
        android_errorWriteWithInfoLog(0x534e4554, "243222985", -1, nullptr, 0);
        return NULL;
    }
    sp<ABuffer> buffer;
    if(!format->findBuffer("pssh", &buffer)) {
        return NULL;