Browse Source

Merge pull request #273 from stazio/fix_rtp_protect

Fixed a typo during the protection of RTP packets
Paul-Louis Ageneau 4 years ago
parent
commit
5482912e18
1 changed files with 3 additions and 3 deletions
  1. 3 3
      src/dtlssrtptransport.cpp

+ 3 - 3
src/dtlssrtptransport.cpp

@@ -130,8 +130,8 @@ bool DtlsSrtpTransport::sendMedia(message_ptr message) {
 				auto ssrc = ((RTP *)message->data())->ssrc();
 				PLOG_INFO << "Adding SSRC to RTP: " << ssrc;
 				addSSRC(ssrc);
-				if ((err = srtp_protect_rtcp(mSrtpOut, message->data(), &size)))
-					throw std::runtime_error("SRTCP protect error, status=" +
+				if ((err = srtp_protect(mSrtpOut, message->data(), &size)))
+					throw std::runtime_error("SRTP protect error, status=" +
 					                         to_string(static_cast<int>(err)));
 			} else
 				throw std::runtime_error("SRTP protect error, status=" +
@@ -224,7 +224,7 @@ void DtlsSrtpTransport::incoming(message_ptr message) {
 					PLOG_INFO << "Adding SSRC to RTP: " << ssrc;
 					addSSRC(ssrc);
 					if ((err = srtp_unprotect(mSrtpIn, message->data(), &size)))
-						throw std::runtime_error("SRTCP unprotect error, status=" +
+						throw std::runtime_error("SRTP unprotect error, status=" +
 						                         to_string(static_cast<int>(err)));
 				} else
 					PLOG_WARNING << "SRTP unprotect error, status=" << err