Fixed the description of SDPs

This commit is contained in:
sam
2021-03-15 19:22:47 -04:00
parent a7620cca16
commit f83a03fcad
2 changed files with 7 additions and 3 deletions

View File

@ -690,6 +690,10 @@ public:
return totalSize - (getBody() - reinterpret_cast<char *>(this));
}
[[nodiscard]] size_t getSize() const{
return header.getSize() + sizeof(uint16_t);
}
[[nodiscard]] RTP &getHeader() { return header; }
size_t normalizePacket(size_t totalSize, SSRC originalSSRC, uint8_t originalPayloadType) {
@ -697,9 +701,8 @@ public:
header.setSsrc(originalSSRC);
header.setPayloadType(originalPayloadType);
// TODO, the -12 is the size of the header (which is variable!)
memmove(header.getBody(), header.getBody() + sizeof(uint16_t),
totalSize - 12 - sizeof(uint16_t));
return totalSize - sizeof(uint16_t);
memmove(header.getBody(), getBody(), totalSize - getSize());
return totalSize - getSize();
}
};

View File

@ -839,6 +839,7 @@ void Description::Media::addRTPMap(const Description::Media::RTPMap &map) {
}
std::vector<uint32_t> Description::Media::getSSRCs() {
return mSsrcs;
std::vector<uint32_t> vec;
for (auto &val : mAttributes) {
PLOG_DEBUG << val;