mirror of
https://github.com/outbackdingo/UltraGrid.git
synced 2026-03-21 16:40:18 +00:00
hd-rum-translator: do not crash on incorrect use
do not crash on `hd-rum-transcode 8M 5004 -P 8000` (hostname missing after port specification)
This commit is contained in:
@@ -656,6 +656,11 @@ static int parse_fmt(int argc, char **argv, struct cmdline_parameters *parsed)
|
||||
}
|
||||
}
|
||||
|
||||
if (argc >= 2 && argv[argc - 2][0] == '-') {
|
||||
fprintf(stderr, "Error: last option on is option '%s', expected hostname\n", argv[argc - 2]);
|
||||
return -1;
|
||||
}
|
||||
|
||||
parsed->hosts.resize(parsed->host_count);
|
||||
// default values
|
||||
for(int i = 0; i < parsed->host_count; ++i) {
|
||||
|
||||
Reference in New Issue
Block a user