mirror of
https://gitee.com/xia-chu/ZLMediaKit.git
synced 2026-05-25 11:07:50 +08:00
Compare commits
No commits in common. "56fe66da7cb61044c4ca93f504101ea52787a6c5" and "fd4f00dd6310ad1e7446d7d52b5f59eecdfb50dd" have entirely different histories.
56fe66da7c
...
fd4f00dd63
@ -341,14 +341,10 @@ void FFmpegSource::onGetMediaSource(const MediaSource::Ptr &src) {
|
|||||||
setDelegate(listener);
|
setDelegate(listener);
|
||||||
muxer->setDelegate(shared_from_this());
|
muxer->setDelegate(shared_from_this());
|
||||||
if (_enable_hls) {
|
if (_enable_hls) {
|
||||||
src->getOwnerPoller()->async([=]() mutable {
|
src->setupRecord(Recorder::type_hls, true, "", 0);
|
||||||
src->setupRecord(Recorder::type_hls, true, "", 0);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
if (_enable_mp4) {
|
if (_enable_mp4) {
|
||||||
src->getOwnerPoller()->async([=]() mutable {
|
src->setupRecord(Recorder::type_mp4, true, "", 0);
|
||||||
src->setupRecord(Recorder::type_mp4, true, "", 0);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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) {
|
HttpFileBody::HttpFileBody(const string &file_path, bool use_mmap) {
|
||||||
|
|
||||||
// 判断是否为目录,避免对目录进行mmap操作,导致程序崩溃。
|
|
||||||
if (File::is_dir(file_path)) {
|
|
||||||
_read_to = -1;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (use_mmap ) {
|
if (use_mmap ) {
|
||||||
_map_addr = getSharedMmap(file_path, _read_to);
|
_map_addr = getSharedMmap(file_path, _read_to);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user