summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxegineering <me@xegineering.eu>2024-11-10 15:54:59 +0100
committerxegineering <me@xegineering.eu>2024-11-10 15:54:59 +0100
commit93d3ce8ca7d335fb15da64981321f82891c1493c (patch)
tree495f191cc2d2d7be28a8c542bff407f31d706156
parent36a2fda37e837bc39c88a2fa38678b0f3bded041 (diff)
downloadsoundbox-go-93d3ce8ca7d335fb15da64981321f82891c1493c.tar
soundbox-go-93d3ce8ca7d335fb15da64981321f82891c1493c.tar.zst
soundbox-go-93d3ce8ca7d335fb15da64981321f82891c1493c.zip
Avoid unnecessary variable for args
-rw-r--r--soundbox/stream.go8
1 files 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