Browse Source

If no ssrc is specified and there's only one track, forward packet to it.

wusspuss 1 year ago
parent
commit
c8cbbcaa8f
1 changed files with 3 additions and 0 deletions
  1. 3 0
      src/impl/peerconnection.cpp

+ 3 - 0
src/impl/peerconnection.cpp

@@ -586,6 +586,9 @@ void PeerConnection::dispatchMedia([[maybe_unused]] message_ptr message) {
 		if (auto track = it->second.lock())
 		if (auto track = it->second.lock())
 			track->incoming(message);
 			track->incoming(message);
 	} else {
 	} else {
+		if (mTrackLines.size()==1) {
+			mTrackLines.front().lock()->incoming(message);
+		}
 		/*
 		/*
 		 * TODO: So the problem is that when stop sending streams, we stop getting report blocks for
 		 * TODO: So the problem is that when stop sending streams, we stop getting report blocks for
 		 * those streams Therefore when we get compound RTCP packets, they are empty, and we can't
 		 * those streams Therefore when we get compound RTCP packets, they are empty, and we can't