Browse Source

Check error after retrying the unprotect call

Don't return without calling receive callback if the unprotect call succeeds after the addSSRC call
iturrioz 4 years ago
parent
commit
f143582de0
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/dtlssrtptransport.cpp

+ 2 - 1
src/dtlssrtptransport.cpp

@@ -228,7 +228,8 @@ void DtlsSrtpTransport::incoming(message_ptr message) {
 				} else
 					PLOG_WARNING << "SRTP unprotect error, status=" << err
 					             << " SSRC=" << reinterpret_cast<RTP *>(message->data())->ssrc();
-				return;
+					if (err)
+						return;
 			}
 			PLOG_VERBOSE << "Unprotected SRTP packet, size=" << size;
 			message->type = Message::Type::Binary;