aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorPaul Adenot <[email protected]>2023-04-25 15:05:45 +0200
committerPaul Adenot <[email protected]>2023-04-26 14:28:46 +0200
commit47720cbc03131f4784558dcf91e8b264e20d5538 (patch)
treea0bbd7d4fbc9d7b9ae81f272ebcb56f67b1566ea
parent2e0fe891062b6437ad26a75dd010d0b0247561f0 (diff)
downloadcubeb-47720cbc03131f4784558dcf91e8b264e20d5538.tar.gz
cubeb-47720cbc03131f4784558dcf91e8b264e20d5538.zip
Don't continue calling the data callback in the winmm backend if the user has returned a negative value
-rw-r--r--src/cubeb_winmm.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/cubeb_winmm.c b/src/cubeb_winmm.c
index 1dd2ec4..2ca86b2 100644
--- a/src/cubeb_winmm.c
+++ b/src/cubeb_winmm.c
@@ -201,6 +201,8 @@ winmm_refill_stream(cubeb_stream * stm)
EnterCriticalSection(&stm->lock);
if (got < 0) {
LeaveCriticalSection(&stm->lock);
+ stm->shutdown = 1;
+ SetEvent(stm->event);
stm->state_callback(stm, stm->user_ptr, CUBEB_STATE_ERROR);
return;
} else if (got < wanted) {