revid-cli: initialising config.Output slice when no outputs are defined so that a default output can still be set

This commit is contained in:
Saxon 2019-02-25 12:59:57 +10:30
parent 9b57306aed
commit 37850e8350
1 changed files with 4 additions and 0 deletions

View File

@ -184,6 +184,10 @@ func handleFlags() revid.Config {
log.Log(logger.Error, pkg+"bad input codec argument")
}
if len(outputs) == 0 {
cfg.Outputs = make([]uint8, 1)
}
for _, o := range outputs {
switch o {
case "File":