diff --git a/src/Player/PlayerProxy.cpp b/src/Player/PlayerProxy.cpp index b601e16e..2c931212 100644 --- a/src/Player/PlayerProxy.cpp +++ b/src/Player/PlayerProxy.cpp @@ -191,13 +191,13 @@ void PlayerProxy::setDirectProxy() { if (dynamic_pointer_cast(_delegate)) { // rtsp拉流 GET_CONFIG(bool, directProxy, Rtsp::kDirectProxy); - if (directProxy) { + if (directProxy && _option.enable_rtsp) { mediaSource = std::make_shared(_tuple); } } else if (dynamic_pointer_cast(_delegate)) { // rtmp拉流 GET_CONFIG(bool, directProxy, Rtmp::kDirectProxy); - if (directProxy) { + if (directProxy && _option.enable_rtmp) { mediaSource = std::make_shared(_tuple); } }