关闭vhost时,m3u8中ts文件不指定vhost:#560

This commit is contained in:
xiongziliang 2020-11-21 21:54:12 +08:00
parent 1cc3add97f
commit c512c1a02e

View File

@ -60,7 +60,8 @@ std::shared_ptr<MediaSinkInterface> Recorder::createRecorder(type type, const st
switch (type) { switch (type) {
case Recorder::type_hls: { case Recorder::type_hls: {
#if defined(ENABLE_HLS) #if defined(ENABLE_HLS)
auto ret = std::make_shared<HlsRecorder>(path, string(VHOST_KEY) + "=" + vhost); GET_CONFIG(bool, enable_vhost, General::kEnableVhost);
auto ret = std::make_shared<HlsRecorder>(path, enable_vhost ? string(VHOST_KEY) + "=" + vhost : "");
ret->setMediaSource(vhost, app, stream_id); ret->setMediaSource(vhost, app, stream_id);
return ret; return ret;
#endif #endif