diff --git a/src/Rtsp/RtspSession.cpp b/src/Rtsp/RtspSession.cpp index e723f970..96c139c7 100644 --- a/src/Rtsp/RtspSession.cpp +++ b/src/Rtsp/RtspSession.cpp @@ -974,6 +974,7 @@ void RtspSession::findStream(const function &cb) { NoticeCenter::Instance().addListener(task_id, Broadcast::kBroadcastMediaChanged, onRegist); //5秒后执行失败回调 doDelay(5, [cb]() { + NoticeCenter::Instance().delListener(task_id,Broadcast::kBroadcastMediaChanged); cb(false); }); }