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

Commit 2380cfe5 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 7704922 from e96575ed to sc-v2-release

Change-Id: Ie29c0423b6b13fc8a1400286b24c41dd5c504bc0
parents 9c459530 e96575ed
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;
    }