Browse Source

Clear all ssrc attributeswhen creating reciprocated sdp of Media, as them are individual.

industriousonesoft 4 năm trước cách đây
mục cha
commit
f39baa818c
1 tập tin đã thay đổi với 11 bổ sung0 xóa
  1. 11 0
      src/description.cpp

+ 11 - 0
src/description.cpp

@@ -690,6 +690,17 @@ Description::Media Description::Media::reciprocate() const {
 		break;
 	}
 
+	// Clear all ssrc attributes as them are individual
+	auto it = mAttributes.begin();
+	while (it != mAttributes.end()) {
+		if (match_prefix(*it, "ssrc:"))
+			it = reciprocated.mAttributes.erase(it);
+		else
+			++it;
+	}
+	reciprocated.mSsrcs.clear();
+	reciprocated.mCNameMap.clear();
+
 	return reciprocated;
 }