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

Commit 6729c57d authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 7705048 from 8d015fc6 to sc-qpr1-release

Change-Id: If922c81110035a6082667fe2f47099050c514689
parents 4701d9ee 8d015fc6
Loading
Loading
Loading
Loading
+13 −2
Original line number Diff line number Diff line
@@ -75,10 +75,21 @@ status_t MediaAppender::init() {
        return status;
    }

    if (strcmp("MPEG4Extractor", mExtractor->getName()) == 0) {
    sp<AMessage> fileFormat;
    status = mExtractor->getFileFormat(&fileFormat);
    if (status != OK) {
        ALOGE("extractor_getFileFormat failed, status :%d", status);
        return status;
    }

    AString fileMime;
    fileFormat->findString("mime", &fileMime);
    // only compare the end of the file MIME type to allow for vendor customized mime type
    if (fileMime.endsWith("mp4")){
        mFormat = MediaMuxer::OUTPUT_FORMAT_MPEG_4;
    } else {
        ALOGE("Unsupported format, extractor name:%s", mExtractor->getName());
        ALOGE("Unsupported file format, extractor name:%s, fileformat %s",
              mExtractor->getName(), fileMime.c_str());
        return ERROR_UNSUPPORTED;
    }