mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-16 13:05:59 +08:00
修复全局变量初始化顺序错乱导致崩溃的问题
This commit is contained in:
@@ -53,8 +53,10 @@ struct MediaSourceNull : public MediaSource {
|
||||
int readerCount() override { return 0; }
|
||||
};
|
||||
|
||||
static std::shared_ptr<MediaSource> s_null = std::make_shared<MediaSourceNull>();
|
||||
MediaSource &MediaSource::NullMediaSource = *s_null;
|
||||
MediaSource &MediaSource::NullMediaSource() {
|
||||
static std::shared_ptr<MediaSource> s_null = std::make_shared<MediaSourceNull>();
|
||||
return *s_null;
|
||||
}
|
||||
|
||||
MediaSource::MediaSource(const string &schema, const string &vhost, const string &app, const string &stream_id){
|
||||
GET_CONFIG(bool, enableVhost, General::kEnableVhost);
|
||||
|
||||
Reference in New Issue
Block a user