mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-23 03:10:04 +08:00
查找MediaSource时,app与stream id不能为空
This commit is contained in:
parent
09fa6b7aae
commit
1485be266a
@ -264,6 +264,11 @@ static MediaSource::Ptr find_l(const string &schema, const string &vhost_in, con
|
|||||||
vhost = DEFAULT_VHOST;
|
vhost = DEFAULT_VHOST;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (app.empty() || id.empty()) {
|
||||||
|
//如果未指定app与stream id,那么就是遍历而非查找,所以应该返回查找失败
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
MediaSource::Ptr ret;
|
MediaSource::Ptr ret;
|
||||||
MediaSource::for_each_media([&](const MediaSource::Ptr &src) { ret = std::move(const_cast<MediaSource::Ptr &>(src)); }, schema, vhost, app, id);
|
MediaSource::for_each_media([&](const MediaSource::Ptr &src) { ret = std::move(const_cast<MediaSource::Ptr &>(src)); }, schema, vhost, app, id);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user