summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsanine <sanine.not@pm.me>2022-09-05 19:28:19 -0500
committersanine <sanine.not@pm.me>2022-09-05 19:28:19 -0500
commit1ac240ed77536f259c04edb26953ef445dd4ee37 (patch)
treea674a909e86d5f0325b1bf9bee55f43e6dcad00e
parent874dc0a549cf803bba6fd9f7acfd847302d9a77e (diff)
fix reset bug in channel_reset()
-rw-r--r--src/channel.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/channel.c b/src/channel.c
index ac955a1..a7a3643 100644
--- a/src/channel.c
+++ b/src/channel.c
@@ -36,8 +36,10 @@ void channel_reset(struct channel_t *chan)
chan->pos = 0;
int loops = channel_atomic_get(chan->shared.loops);
if (loops) {
- if (p_atomic_int_dec_and_test(&(chan->shared.loops)))
+ if (p_atomic_int_dec_and_test(&(chan->shared.loops))) {
channel_atomic_set(chan->shared.active, false);
+ chan->skip = true;
+ }
}
}