浏览代码

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

industriousonesoft 4 年之前
父节点
当前提交
f39baa818c
共有 1 个文件被更改,包括 11 次插入0 次删除
  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;
 }