From 80efff04865c888a93b06b505366477b31d1c871 Mon Sep 17 00:00:00 2001 From: FrederikTheDane <13228251+FrederikTheDane@users.noreply.github.com> Date: Tue, 21 Nov 2023 18:18:50 +0100 Subject: [PATCH] fix: ffmpeg terminated prematurely (#2240) --- CHANGELOG.md | 2 ++ discord/player.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 41f9e96c11..acc9ecc98e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -180,6 +180,8 @@ These changes are available on the `master` branch, but have not yet been releas ([#2192](https://github.com/Pycord-Development/pycord/pull/2192)) - Fixed `DMChannel.recipient` being `None` and consequently `User.dm_channel` also being `None`. ([#2219](https://github.com/Pycord-Development/pycord/pull/2219)) +- Fixed ffmpeg being terminated prematurely when piping audio stream. + ([#2240](https://github.com/Pycord-Development/pycord/pull/2240)) ## [2.4.1] - 2023-03-20 diff --git a/discord/player.py b/discord/player.py index 87b0f5718a..0b4dc417c3 100644 --- a/discord/player.py +++ b/discord/player.py @@ -227,7 +227,7 @@ def _pipe_writer(self, source: io.BufferedIOBase) -> None: # arbitrarily large read size data = source.read(8192) if not data: - self._process.terminate() + self._stdin.close() return try: self._stdin.write(data)