Skip to content

Commit

Permalink
Merge pull request #305 from Eyevinn/fix-cenc-init-check
Browse files Browse the repository at this point in the history
fix: removed dead code in mp4ff-decrypt
  • Loading branch information
tobbee authored Dec 11, 2023
2 parents d0e5380 + c5f2e42 commit fd7b140
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 fd7b140

Please sign in to comment.