修复调用stopSendRtp接口无法触发无人观看事件的bug:#1189
This commit is contained in:
parent
350a0e3f81
commit
e249a03dc2
|
|
@ -219,11 +219,12 @@ void MultiMediaSourceMuxer::startSendRtp(MediaSource &, const string &dst_url, u
|
||||||
|
|
||||||
bool MultiMediaSourceMuxer::stopSendRtp(MediaSource &sender, const string &ssrc) {
|
bool MultiMediaSourceMuxer::stopSendRtp(MediaSource &sender, const string &ssrc) {
|
||||||
#if defined(ENABLE_RTPPROXY)
|
#if defined(ENABLE_RTPPROXY)
|
||||||
|
std::unique_ptr<onceToken> token;
|
||||||
if (&sender != MediaSource::NullMediaSource) {
|
if (&sender != MediaSource::NullMediaSource) {
|
||||||
onceToken token(nullptr, [&]() {
|
token.reset(new onceToken(nullptr, [&]() {
|
||||||
//关闭rtp推流,可能触发无人观看事件
|
//关闭rtp推流,可能触发无人观看事件
|
||||||
MediaSourceEventInterceptor::onReaderChanged(sender, totalReaderCount());
|
MediaSourceEventInterceptor::onReaderChanged(sender, totalReaderCount());
|
||||||
});
|
}));
|
||||||
}
|
}
|
||||||
if (ssrc.empty()) {
|
if (ssrc.empty()) {
|
||||||
//关闭全部
|
//关闭全部
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue