Skip to content

Commit a77c238

Browse files
authored
Merge pull request #144 from edgeware/fix-crop
fix mp4ff-crop: better bad cli options handling
2 parents 38b65c2 + 3e5dc2f commit a77c238

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cmd/mp4ff-crop/main.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ func parseOptions() {
4545
}
4646

4747
func main() {
48-
4948
parseOptions()
5049

5150
if opts.version {
@@ -54,12 +53,14 @@ func main() {
5453
}
5554

5655
if opts.durationMS <= 0 {
56+
fmt.Printf("error: duration must be larger than 0\n\n")
5757
flag.Usage()
5858
os.Exit(1)
5959
}
6060

6161
var inFilePath = flag.Arg(0)
6262
if inFilePath == "" {
63+
fmt.Printf("error: no infile path specified\n\n")
6364
flag.Usage()
6465
os.Exit(1)
6566
}

0 commit comments

Comments
 (0)