Stop audio mixer on pipeline cancellation to prevent 100% CPU usage
This commit is contained in:
1
changelog/2955.fixed.md
Normal file
1
changelog/2955.fixed.md
Normal file
@@ -0,0 +1 @@
|
|||||||
|
- Fixed audio mixer not being stopped on pipeline cancellation, causing 100% CPU usage after call disconnect.
|
||||||
@@ -504,6 +504,10 @@ class BaseOutputTransport(FrameProcessor):
|
|||||||
await self._cancel_clock_task()
|
await self._cancel_clock_task()
|
||||||
await self._cancel_video_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):
|
async def handle_interruptions(self, _: InterruptionFrame):
|
||||||
"""Handle interruption events by restarting tasks and clearing buffers.
|
"""Handle interruption events by restarting tasks and clearing buffers.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user