summaryrefslogtreecommitdiff
path: root/soundbox/stream.go
diff options
context:
space:
mode:
Diffstat (limited to 'soundbox/stream.go')
-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