diff --git a/restream/restream.go b/restream/restream.go index 0c6be4aa..ac144dd7 100644 --- a/restream/restream.go +++ b/restream/restream.go @@ -729,7 +729,9 @@ func (r *restream) validateInputAddress(address, basedir string) (string, error) } func (r *restream) validateOutputAddress(address, basedir string) (string, bool, error) { - if strings.Contains(address, "|") { + // If the address contains a "|" or it starts with a "[", then assume that it + // is an address for the tee muxer. + if strings.Contains(address, "|") || strings.HasPrefix(address, "[") { addresses := strings.Split(address, "|") isFile := false diff --git a/restream/restream_test.go b/restream/restream_test.go index 51026384..8df09237 100644 --- a/restream/restream_test.go +++ b/restream/restream_test.go @@ -469,6 +469,7 @@ func TestOutputAddressValidation(t *testing.T) { "-": {"pipe:", false}, "/core/data/foobar|http://example.com": {"file:/core/data/foobar|http://example.com", false}, "/core/data/foobar|/etc/passwd": {"/core/data/foobar|/etc/passwd", true}, + "[f=mpegts]udp://10.0.1.255:1234/": {"[f=mpegts]udp://10.0.1.255:1234/", false}, "[f=null]-|[f=null]-": {"[f=null]pipe:|[f=null]pipe:", false}, "[onfail=ignore]/core/data/archive-20121107.mkv|[f=mpegts]udp://10.0.1.255:1234/": {"[onfail=ignore]file:/core/data/archive-20121107.mkv|[f=mpegts]udp://10.0.1.255:1234/", false}, }