From d11799c5f7e097c2bf6afb58b43da70fec2e7fba Mon Sep 17 00:00:00 2001 From: Stein Ivar Berghei Date: Sat, 19 Nov 2022 17:10:14 +0100 Subject: [PATCH] Increase ffmpeg buffer to avoid edge cases where ffmpeg just exits right away --- ffmpeg/ffmpeg.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ffmpeg/ffmpeg.go b/ffmpeg/ffmpeg.go index 2606ed4..8b040e0 100644 --- a/ffmpeg/ffmpeg.go +++ b/ffmpeg/ffmpeg.go @@ -71,7 +71,7 @@ RETRY: // FFmpeg requires a certain buffer size to start writing. This seems to be enough? // This will grow big enough to fit the whole song. - ff.Out = bytes.NewBuffer(make([]byte, 43920)) + ff.Out = bytes.NewBuffer(make([]byte, 128*1024)) ff.Cmd.Stdout = ff.Out exitctx, cancel := context.WithTimeout(context.Background(), 2*time.Second)