Commit 97a035d4 authored by Guillaume Roguez's avatar Guillaume Roguez
Browse files

#30247: video: pipeline must be detached when node are killed.

parent f238ce9c
...@@ -154,6 +154,10 @@ void VideoRtpSession::start(int localPort) ...@@ -154,6 +154,10 @@ void VideoRtpSession::start(int localPort)
sender_.reset(new VideoSender(callID_, txArgs_, *socketPair_)); sender_.reset(new VideoSender(callID_, txArgs_, *socketPair_));
} else { } else {
DEBUG("Video sending disabled"); DEBUG("Video sending disabled");
if (videoLocal_)
videoLocal_->detach(sender_.get());
if (videoMixerSP_)
videoMixerSP_->detach(sender_.get());
sender_.reset(); sender_.reset();
} }
...@@ -166,6 +170,8 @@ void VideoRtpSession::start(int localPort) ...@@ -166,6 +170,8 @@ void VideoRtpSession::start(int localPort)
receiveThread_->start(); receiveThread_->start();
} else { } else {
DEBUG("Video receiving disabled"); DEBUG("Video receiving disabled");
if (receiveThread_)
receiveThread_->detach(videoMixerSP_.get());
receiveThread_.reset(); receiveThread_.reset();
} }
...@@ -186,7 +192,8 @@ void VideoRtpSession::stop() ...@@ -186,7 +192,8 @@ void VideoRtpSession::stop()
if (videoMixerSP_) { if (videoMixerSP_) {
videoMixerSP_->detach(sender_.get()); videoMixerSP_->detach(sender_.get());
receiveThread_->detach(videoMixerSP_.get()); if (receiveThread_)
receiveThread_->detach(videoMixerSP_.get());
} }
if (socketPair_.get()) if (socketPair_.get())
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment