Skip to content

Commit 795c95c

Browse files
quariumcmassiot
authored andcommitted
tests/upipe_audio_graph: remove division by zero
1 parent 993cd71 commit 795c95c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/upipe_audio_graph_test.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/*
22
* Copyright (C) 2016 OpenHeadend S.A.R.L.
3+
* Copyright (C) 2025 EasyTools
34
*
45
* Authors: Christophe Massiot
56
*
@@ -183,8 +184,8 @@ int main(int argc, char **argv)
183184
for (int i = 0; i < HIST; i++) {
184185
uref = uref_alloc(uref_mgr);
185186
assert(uref);
186-
ubase_assert(uref_amax_set_amplitude(uref, 0.8 / i, 0));
187-
ubase_assert(uref_amax_set_amplitude(uref, 0.6 / i, 1));
187+
ubase_assert(uref_amax_set_amplitude(uref, 0.8 / (i + 1), 0));
188+
ubase_assert(uref_amax_set_amplitude(uref, 0.6 / (i + 1), 1));
188189
/* Now send uref */
189190
upipe_input(agraph, uref, NULL);
190191
assert(got_uref);

0 commit comments

Comments
 (0)