Skip to content

Commit 3bf9767

Browse files
committed
2 parents 7688427 + beec098 commit 3bf9767

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

include/RTMFP.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ along with Librtmfp. If not, see <http://www.gnu.org/licenses/>.
3232

3333
#include "Mona/Logs.h"
3434

35-
#define RTMFP_LIB_VERSION 0x0102000B // (1.2.11)
35+
#define RTMFP_LIB_VERSION 0x0102000C // (1.2.12)
3636

3737
#define RTMFP_DEFAULT_KEY (UInt8*)"Adobe Systems 02"
3838
#define RTMFP_KEY_SIZE 0x10

sources/NetGroup.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,14 @@ NetGroup::NetGroup(const string& groupId, const string& groupTxt, const string&
130130
itGroupMedia = _mapGroupMedias.emplace_hint(itGroupMedia, piecewise_construct, forward_as_tuple(streamKey), forward_as_tuple(_conn.poolBuffers(), stream, streamKey, pParameters));
131131
itGroupMedia->second.subscribe(onGroupPacket);
132132
DEBUG("Creation of GroupMedia ", itGroupMedia->second.id," for the stream ", stream, " :\n", Util::FormatHex(BIN streamKey.data(), streamKey.size(), LOG_BUFFER))
133+
134+
// Send the group media infos to each other peers
135+
for (auto itPeer : _mapPeers) {
136+
if (itPeer.first == peerId)
137+
continue;
138+
auto pPeerMedia = itPeer.second->getPeerMedia(itGroupMedia->first);
139+
itGroupMedia->second.sendGroupMedia(pPeerMedia);
140+
}
133141
}
134142

135143
// And finally try to add the peer and send the GroupMedia subscription

sources/RTMFPHandshaker.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ void RTMFPHandshaker::handleRedirection(BinaryReader& reader) {
476476
DEBUG("Server has sent to us the peer addresses of responders") // (we are the initiator)
477477

478478
// Reset the host address if it changes
479-
if (hostAddress != pHandshake->hostAddress) {
479+
if (hostAddress && hostAddress != pHandshake->hostAddress) {
480480
pHandshake->pSession->setAddresses(hostAddress, pHandshake->listAddresses);
481481
pHandshake->hostAddress = hostAddress;
482482
}

0 commit comments

Comments
 (0)