Skip to content

Commit

Permalink
Merge pull request #379 from Eyevinn/fix-mp4ff-encrypt
Browse files Browse the repository at this point in the history
fix: broken mp4ff-encrypt CLI
  • Loading branch information
tobbee authored Oct 30, 2024
2 parents bdea2fb + 0800046 commit efb6fce
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Allow missing optional DecoderSpecificInfo
- Avoid mp4.File.Mdat pointing to an empty mdat box
- `cmd/mp4ff-encrypt` did not parse command line

### Removed

Expand Down
4 changes: 3 additions & 1 deletion cmd/mp4ff-encrypt/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ func parseOptions() {
fmt.Fprintf(os.Stderr, "\n%s [options] infile outfile\n\noptions:\n", name)
flag.PrintDefaults()
}
flag.Parse()
}

func main() {
Expand All @@ -56,14 +57,15 @@ func main() {
}

if len(flag.Args()) != 2 {
fmt.Fprintf(os.Stderr, "Error: must specify infile and outfile and no other arguments\n")
flag.Usage()
os.Exit(1)
}
var inFilePath = flag.Arg(0)
var outFilePath = flag.Arg(1)

if opts.hexKey == "" || opts.ivHex == "" {
fmt.Fprintf(os.Stderr, "need both key and iv\n")
fmt.Fprintf(os.Stderr, "Error: need both key and iv\n")
flag.Usage()
os.Exit(1)
}
Expand Down

0 comments on commit efb6fce

Please sign in to comment.