vidforward/file.go: check length of urls on load

This commit is contained in:
Saxon Nelson-Milton 2023-03-13 12:37:03 +10:30
parent c82d7a8e55
commit 418b33040c
1 changed files with 3 additions and 0 deletions

View File

@ -38,6 +38,9 @@ import (
var loggingLevel = logging.Info
func newRevid(log logging.Logger, urls []string) (*revid.Revid, error) {
if len(urls) <= 0 {
return nil, fmt.Errorf("cannot have %d URLs", len(urls))
}
var outputs []uint8
for _ = range urls {
outputs = append(outputs, config.OutputRTMP)