Skip to content

Commit

Permalink
fix: removed dead code in mp4ff-decrypt
Browse files Browse the repository at this point in the history
  • Loading branch information
tobbee committed Dec 11, 2023
1 parent d0e5380 commit c5f2e42
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions cmd/mp4ff-decrypt/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ func decryptFile(r, initR io.Reader, w io.Writer, hexKey string) error {
return fmt.Errorf("file not fragmented. Not supported")
}

var init *mp4.InitSegment
init := inMp4.Init

if inMp4.Init == nil {
if initR == nil {
Expand All @@ -114,11 +114,6 @@ func decryptFile(r, initR io.Reader, w io.Writer, hexKey string) error {
return fmt.Errorf("could not decode init file: %w", err)
}
init = iSeg.Init
} else {
init = inMp4.Init
if init == nil {
return fmt.Errorf("no init segment part of file")
}
}

decryptInfo, err := mp4.DecryptInit(init)
Expand Down

0 comments on commit c5f2e42

Please sign in to comment.