mirror of
https://github.com/mii443/libdatachannel.git
synced 2025-08-22 15:15:28 +00:00
Reset outgoing callback when switching media handlers
This commit is contained in:
@ -182,6 +182,9 @@ bool Track::transportSend([[maybe_unused]] message_ptr message) {
|
||||
void Track::setMediaHandler(shared_ptr<MediaHandler> handler) {
|
||||
{
|
||||
std::unique_lock lock(mMutex);
|
||||
if (mMediaHandler)
|
||||
mMediaHandler->onOutgoing(nullptr);
|
||||
|
||||
mMediaHandler = handler;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user