changeset 200:834656633fa0

sip-manual-out TFO: use is_hunt_fill mechanism
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 02 Apr 2023 17:44:23 -0800
parents e6c7ced3c031
children d3c99b41fb04
files sip-manual-out/rtp_rx.c
diffstat 1 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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;