Compare commits

..

No commits in common. "56fe66da7cb61044c4ca93f504101ea52787a6c5" and "fd4f00dd6310ad1e7446d7d52b5f59eecdfb50dd" have entirely different histories.

2 changed files with 2 additions and 13 deletions

View File

@ -341,14 +341,10 @@ void FFmpegSource::onGetMediaSource(const MediaSource::Ptr &src) {
setDelegate(listener);
muxer->setDelegate(shared_from_this());
if (_enable_hls) {
src->getOwnerPoller()->async([=]() mutable {
src->setupRecord(Recorder::type_hls, true, "", 0);
});
src->setupRecord(Recorder::type_hls, true, "", 0);
}
if (_enable_mp4) {
src->getOwnerPoller()->async([=]() mutable {
src->setupRecord(Recorder::type_mp4, true, "", 0);
});
src->setupRecord(Recorder::type_mp4, true, "", 0);
}
}
}

View File

@ -194,13 +194,6 @@ static std::shared_ptr<char> getSharedMmap(const string &file_path, int64_t &fil
}
HttpFileBody::HttpFileBody(const string &file_path, bool use_mmap) {
// 判断是否为目录避免对目录进行mmap操作导致程序崩溃。
if (File::is_dir(file_path)) {
_read_to = -1;
return;
}
if (use_mmap ) {
_map_addr = getSharedMmap(file_path, _read_to);
}