From be75349fbad5360f1a1a0e2a13d6b4aff002ae54 Mon Sep 17 00:00:00 2001 From: Michal Hajek Date: Fri, 14 Jul 2023 14:00:31 +0200 Subject: [PATCH] Fix SRTPCheck testing on an unlimited number of calls #642 --- src/rtpstream.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/rtpstream.cpp b/src/rtpstream.cpp index bf4ea3fe..5479aa94 100644 --- a/src/rtpstream.cpp +++ b/src/rtpstream.cpp @@ -2623,6 +2623,7 @@ void rtpstream_audioecho_thread(void* param) unsigned int host_ssrc = 0; bool abnormal_termination = false; ParamPass p; + quit_audioecho_thread = false; // inicialization tspec.tv_sec = 0; tspec.tv_nsec = 10000000; /* 10ms */ @@ -2712,6 +2713,7 @@ void rtpstream_audioecho_thread(void* param) payload_data.clear(); // DECRYPT + g_rxUASAudio.setSSRC(ntohl(((rtp_header_t*)audio_packet_in.data())->ssrc_id)); // set incoming SSRC id rc = g_rxUASAudio.processIncomingPacket(seq_num, audio_packet_in, rtp_header, payload_data); pthread_mutex_lock(&debugremutexaudio); if (debugrefileaudio != NULL) @@ -2754,6 +2756,7 @@ void rtpstream_audioecho_thread(void* param) memcpy(payload_data.data(), msg.get() + sizeof(rtp_header_t), g_txUASAudio.getSrtpPayloadSize()); // ENCRYPT + g_txUASAudio.setSSRC(ntohl(((rtp_header_t*)audio_packet_in.data())->ssrc_id)); // set incoming SSRC id rc = g_txUASAudio.processOutgoingPacket(seq_num, rtp_header, payload_data, audio_packet_out); pthread_mutex_lock(&debugremutexaudio); if (debugrefileaudio != NULL) @@ -2882,6 +2885,7 @@ void rtpstream_videoecho_thread(void* param) unsigned int host_ssrc = 0; bool abnormal_termination = false; ParamPass p; + quit_audioecho_thread = false; // inicialization tspec.tv_sec = 0; tspec.tv_nsec = 10000000; /* 10ms */ @@ -2970,6 +2974,7 @@ void rtpstream_videoecho_thread(void* param) rtp_header.clear(); payload_data.clear(); // DECRYPT + g_rxUASVideo.setSSRC(ntohl(((rtp_header_t*)video_packet_in.data())->ssrc_id)); // set incoming SSRC id rc = g_rxUASVideo.processIncomingPacket(seq_num, video_packet_in, rtp_header, payload_data); pthread_mutex_lock(&debugremutexvideo); if (debugrefilevideo != NULL) @@ -3012,6 +3017,7 @@ void rtpstream_videoecho_thread(void* param) memcpy(payload_data.data(), msg.get() + sizeof(rtp_header_t), g_txUASVideo.getSrtpPayloadSize()); // ENCRYPT + g_txUASVideo.setSSRC(ntohl(((rtp_header_t*)video_packet_in.data())->ssrc_id)); // set incoming SSRC id rc = g_txUASVideo.processOutgoingPacket(seq_num, rtp_header, payload_data, video_packet_out); pthread_mutex_lock(&debugremutexvideo); if (debugrefilevideo != NULL)