Skip to content

Commit 2213c30

Browse files
author
Matt Hallacy
committed
Fix audio flag inversion, ensure there is always audio when it's not disabled.
1 parent 8c5f01f commit 2213c30

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

process.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ func (p Process) Spawn(path, URI string) *exec.Cmd {
5757
"tcp",
5858
"-i",
5959
URI,
60+
"-f",
61+
"lavfi",
62+
"-i",
63+
"anullsrc=channel_layout=stereo:sample_rate=44100",
6064
"-vsync",
6165
"0",
6266
"-copyts",
@@ -65,7 +69,7 @@ func (p Process) Spawn(path, URI string) *exec.Cmd {
6569
"-movflags",
6670
"frag_keyframe+empty_moov",
6771
}
68-
if p.audio {
72+
if (!p.audio) {
6973
processCommands = append(processCommands, "-an")
7074
}
7175
processCommands = append(processCommands,

0 commit comments

Comments
 (0)