summaryrefslogtreecommitdiff
path: root/main/dsp.c
diff options
context:
space:
mode:
Diffstat (limited to 'main/dsp.c')
-rw-r--r--main/dsp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/main/dsp.c b/main/dsp.c
index 02cdc9d73..da982d0c1 100644
--- a/main/dsp.c
+++ b/main/dsp.c
@@ -624,10 +624,10 @@ static int v21_detect(struct ast_dsp *dsp, v21_detect_state_t *s, int16_t *amp,
}
if (hit) {
- if (s->hit_count == 0 || s->miss_count == 3) {
+ if (s->miss_count == 3) {
s->hit_count++;
} else {
- s->hit_count = 0;
+ s->hit_count = 1;
}
s->miss_count = 0;