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

Commit 047b0251 authored by Lajos Molnar's avatar Lajos Molnar Committed by gitbuildkicker
Browse files

stagefright: handle NULL format after convertMetaDataToMessage

Bug: 30421366
Change-Id: I411f9f22b39943f7c8fa4e22fc37efe5f9e0ccb5
parent 3b92080d
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -229,7 +229,8 @@ sp<AMessage> NuPlayer::StreamingSource::getFormat(bool audio) {

    sp<MetaData> meta = source->getFormat();
    status_t err = convertMetaDataToMessage(meta, &format);
    if (err != OK) {
    if (err != OK) { // format may have been cleared on error
        format = new AMessage;
        format->setInt32("err", err);
    }
    return format;
+3 −1
Original line number Diff line number Diff line
@@ -43,7 +43,9 @@ sp<SimpleDecodingSource> SimpleDecodingSource::Create(
    CHECK(meta->findCString(kKeyMIMEType, &mime));

    sp<AMessage> format = new AMessage;
    convertMetaDataToMessage(source->getFormat(), &format);
    if (convertMetaDataToMessage(source->getFormat(), &format) != OK) {
        return NULL;
    }

    Vector<AString> matchingCodecs;
    MediaCodecList::findMatchingCodecs(