multiplex: Fix bug in reception_flow

This commit is contained in:
Heikki Tampio 2023-06-26 14:33:20 +03:00
parent f8de48fa2d
commit 5ed7ff97de
1 changed files with 3 additions and 3 deletions

View File

@ -524,7 +524,7 @@ void uvgrtp::reception_flow::process_packet(int rce_flags)
* field being 0x5a525450. Holepuncher packets contain 0x00 payload. However, holepunching is
* not needed if RTCP is enabled.
* 4. After determining the correct protocol, hand out the packet to the correct handler if it exists. */
int i = 1;
int i = 0;
for (auto& p : packet_handlers_) {
uvgrtp::frame::rtp_frame* frame = nullptr;
++i;
@ -581,7 +581,7 @@ void uvgrtp::reception_flow::process_packet(int rce_flags)
uint8_t version = (*(uint8_t*)&ptr[0] >> 6) & 0x3;
/* -------------------- ZRTP check --------------------------------- */
/* if (rce_flags & RCE_SRTP_KMNGMNT_ZRTP) {
if (rce_flags & RCE_SRTP_KMNGMNT_ZRTP) {
// Magic Cookie 0x5a525450
if (version == 0x0 && ntohl(*(uint32_t*)&ptr[4]) == 0x5a525450) {
if (handlers->zrtp.handler != nullptr) {
@ -589,7 +589,7 @@ void uvgrtp::reception_flow::process_packet(int rce_flags)
}
break;
}
}*/
}
/* -------------------- RTP check ---------------------------------- */
if (version == 0x2) {