diff --git a/src/Record/Recorder.cpp b/src/Record/Recorder.cpp index b7ccd05f..e678715b 100644 --- a/src/Record/Recorder.cpp +++ b/src/Record/Recorder.cpp @@ -60,7 +60,8 @@ std::shared_ptr Recorder::createRecorder(type type, const st switch (type) { case Recorder::type_hls: { #if defined(ENABLE_HLS) - auto ret = std::make_shared(path, string(VHOST_KEY) + "=" + vhost); + GET_CONFIG(bool, enable_vhost, General::kEnableVhost); + auto ret = std::make_shared(path, enable_vhost ? string(VHOST_KEY) + "=" + vhost : ""); ret->setMediaSource(vhost, app, stream_id); return ret; #endif