mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-20 23:32:22 +08:00
修复断连续推情况下线程迁移导致崩溃的bug:#2283
如果一个MultiMediaSourceMuxer对象上挂载了很多个RtpSender对象, 这些对象会绑定MultiMediaSourceMuxer的OwnerPoller(归属线程), 在断连续推发生时,对应的MultiMediaSourceMuxer对象OwnerPoller线程 将发生变更,导致与RtpSender对象的线程不一致。
This commit is contained in:
@@ -246,6 +246,10 @@ void MultiMediaSourceMuxer::startSendRtp(MediaSource &sender, const MediaSourceE
|
||||
if (!strong_self || ex) {
|
||||
return;
|
||||
}
|
||||
if (!strong_self->getOwnerPoller(MediaSource::NullMediaSource())->isCurrentThread()) {
|
||||
// poller线程发生变更了
|
||||
return;
|
||||
}
|
||||
for (auto &track : strong_self->getTracks(false)) {
|
||||
rtp_sender->addTrack(track);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user