mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-14 20:15:58 +08:00
完善线程安全设计
This commit is contained in:
@@ -576,8 +576,8 @@ MediaSource::Ptr MediaSource::createFromMP4(const string &schema, const string &
|
||||
}
|
||||
#ifdef ENABLE_MP4
|
||||
try {
|
||||
MP4Reader::Ptr pReader(new MP4Reader(vhost, app, stream, file_path));
|
||||
pReader->startReadMP4();
|
||||
auto reader = std::make_shared<MP4Reader>(vhost, app, stream, file_path);
|
||||
reader->startReadMP4();
|
||||
return MediaSource::find(schema, vhost, app, stream);
|
||||
} catch (std::exception &ex) {
|
||||
WarnL << ex.what();
|
||||
@@ -733,7 +733,7 @@ toolkit::EventPoller::Ptr MediaSourceEventInterceptor::getOwnerPoller(MediaSourc
|
||||
if (listener) {
|
||||
return listener->getOwnerPoller(sender);
|
||||
}
|
||||
return nullptr;
|
||||
return EventPollerPool::Instance().getPoller();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user