From cb1821cf88170750dd7a2011c36717d9a7777fb1 Mon Sep 17 00:00:00 2001 From: xiongguangjie Date: Thu, 22 Aug 2024 11:11:04 +0800 Subject: [PATCH] Fix addStreamProxy retry bug (#3830 #3810 #3837) Fix addStreamProxy retry bug( protocol option overwrite once play success ), result in some media source not register; it's found by the issue #3830 #3810 --- src/Player/PlayerProxy.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Player/PlayerProxy.cpp b/src/Player/PlayerProxy.cpp index 2c931212..93be867b 100644 --- a/src/Player/PlayerProxy.cpp +++ b/src/Player/PlayerProxy.cpp @@ -288,14 +288,18 @@ void PlayerProxy::onPlaySuccess() { if (dynamic_pointer_cast(_media_src)) { // rtsp拉流代理 if (reset_when_replay || !_muxer) { + auto old = _option.enable_rtsp; _option.enable_rtsp = false; _muxer = std::make_shared(_tuple, getDuration(), _option); + _option.enable_rtsp = old; } } else if (dynamic_pointer_cast(_media_src)) { // rtmp拉流代理 if (reset_when_replay || !_muxer) { + auto old = _option.enable_rtmp; _option.enable_rtmp = false; _muxer = std::make_shared(_tuple, getDuration(), _option); + _option.enable_rtmp = old; } } else { // 其他拉流代理