Stop audio mixer on pipeline cancellation to prevent 100% CPU usage

This commit is contained in:
Rupesh
2026-04-06 01:51:29 -07:00
parent 54fd73c460
commit 7585864113
2 changed files with 5 additions and 0 deletions

1
changelog/2955.fixed.md Normal file
View File

@@ -0,0 +1 @@
- Fixed audio mixer not being stopped on pipeline cancellation, causing 100% CPU usage after call disconnect.

View File

@@ -504,6 +504,10 @@ class BaseOutputTransport(FrameProcessor):
await self._cancel_clock_task()
await self._cancel_video_task()
# Stop audio mixer so it doesn't keep generating frames after cancellation.
if self._mixer:
await self._mixer.stop()
async def handle_interruptions(self, _: InterruptionFrame):
"""Handle interruption events by restarting tasks and clearing buffers.