# HG changeset patch # User Mychaela Falconia # Date 1680486263 28800 # Node ID 834656633fa00a59206762214bb0fb5b81fb8f39 # Parent e6c7ced3c03129285a1645dcfa30c9f6623a7dd3 sip-manual-out TFO: use is_hunt_fill mechanism diff -r e6c7ced3c031 -r 834656633fa0 sip-manual-out/rtp_rx.c --- a/sip-manual-out/rtp_rx.c Wed Mar 29 20:23:43 2023 -0800 +++ b/sip-manual-out/rtp_rx.c Sun Apr 02 17:44:23 2023 -0800 @@ -32,14 +32,14 @@ static uint8_t is_hunt_buf[320]; static int is_state; -static unsigned is_offset, is_bit_count; +static unsigned is_offset, is_bit_count, is_hunt_fill; static uint32_t is_rx_word; static void reset_is_hunt() { - memset(is_hunt_buf, 0xFF, 320); is_state = 0; + is_hunt_fill = 0; } static void @@ -63,6 +63,7 @@ is_state = 1; is_bit_count = 0; is_rx_word = 0; + is_hunt_fill = 0; } static void @@ -144,7 +145,10 @@ memmove(is_hunt_buf, is_hunt_buf + 16, 304); memcpy(is_hunt_buf + 304, input, 16); if (!is_state) { - is_rx_hunt(input_pos); + if (is_hunt_fill < 20) + is_hunt_fill++; + if (is_hunt_fill == 20) + is_rx_hunt(input_pos); return; } new_bit = input[is_offset] & 1;