From 1cf0a0cc2035b8f2432d866de8afd5407bc57f6c Mon Sep 17 00:00:00 2001 From: xiongziliang <771730766@qq.com> Date: Sat, 12 Mar 2022 14:02:12 +0800 Subject: [PATCH] bug fix --- src/Rtsp/RtspMediaSourceImp.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Rtsp/RtspMediaSourceImp.h b/src/Rtsp/RtspMediaSourceImp.h index a717a832..36878fa8 100644 --- a/src/Rtsp/RtspMediaSourceImp.h +++ b/src/Rtsp/RtspMediaSourceImp.h @@ -80,9 +80,7 @@ public: //开启直接代理模式时,rtsp直接代理,不重复产生;但是有些rtsp推流端,由于sdp中已有sps pps,rtp中就不再包括sps pps, //导致rtc无法播放,所以在rtsp推流rtc播放时,建议关闭直接代理模式 _option = option; - if (!direct_proxy) { - _option.enable_rtsp = true; - } + _option.enable_rtsp = !direct_proxy; _muxer = std::make_shared(getVhost(), getApp(), getId(), _demuxer->getDuration(), _option); _muxer->setMediaListener(getListener()); _muxer->setTrackListener(std::static_pointer_cast(shared_from_this()));