Loading media/libstagefright/MediaAppender.cpp +13 −2 Original line number Diff line number Diff line Loading @@ -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; } Loading Loading
media/libstagefright/MediaAppender.cpp +13 −2 Original line number Diff line number Diff line Loading @@ -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; } Loading