From 93d3ce8ca7d335fb15da64981321f82891c1493c Mon Sep 17 00:00:00 2001 From: xegineering Date: Sun, 10 Nov 2024 15:54:59 +0100 Subject: Avoid unnecessary variable for args --- soundbox/stream.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/soundbox/stream.go b/soundbox/stream.go index 0d6fe5f..910523d 100644 --- a/soundbox/stream.go +++ b/soundbox/stream.go @@ -55,7 +55,9 @@ func StreamURLContext(ctx context.Context, url string, targets []net.HardwareAdd } }() - args := []string{ + cmd := exec.CommandContext( + ctx, + "ffmpeg", "-re", "-i", url, @@ -64,9 +66,7 @@ func StreamURLContext(ctx context.Context, url string, targets []net.HardwareAdd "-f", "ogg", "-", - } - - cmd := exec.CommandContext(ctx, "ffmpeg", args...) + ) stdout, err := cmd.StdoutPipe() if err != nil { return err -- cgit v1.2.3-70-g09d2