Paul-Louis Ageneau 5 years ago
parent
commit
fdea83cdfd
2 changed files with 4 additions and 2 deletions
  1. 2 1
      src/description.cpp
  2. 2 1
      src/dtlssrtptransport.cpp

+ 2 - 1
src/description.cpp

@@ -580,8 +580,9 @@ Description::Media& Description::addVideoMedia(Description::Direction direction)
     return this->mMedia.at(mMedia.size()-1);
 }
 
+} // namespace rtc
+
 std::ostream &operator<<(std::ostream &out, const rtc::Description &description) {
 	return out << std::string(description);
 }
 
-}

+ 2 - 1
src/dtlssrtptransport.cpp

@@ -155,7 +155,8 @@ void DtlsSrtpTransport::incoming(message_ptr message) {
 
 	} else if (value1 >= 128 && value1 <= 191) {
 		// The RTP header has a minimum size of 12 bytes
-		if (size < 12) {
+		// An RTCP packet can have a minimum size of 8 bytes
+		if (size < 8) {
 			PLOG_WARNING << "Incoming SRTP/SRTCP packet too short, size=" << size;
 			return;
 		}