Skip to content

Commit

Permalink
Merge pull request #316 from Eyevinn/fix-crypto-avc3
Browse files Browse the repository at this point in the history
fix: make encryption work also for avc3
  • Loading branch information
tobbee authored Jan 18, 2024
2 parents 28f71a5 + c51790a commit ce2a79c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

- Nothing yet
### Fixed

- Support avc3 sample description when encrypting

## [0.41.0] - 2024-01-12

Expand Down
4 changes: 2 additions & 2 deletions mp4/crypto.go
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ func InitProtect(init *InitSegment, key, iv []byte, scheme string, kid UUID, pss
sinf.AddChild(&frma)
se.AddChild(&sinf)
switch veType {
case "avc1":
case "avc1", "avc3":
ipd.ProtFunc, err = getAVCProtFunc(se.AvcC)
if err != nil {
return nil, fmt.Errorf("get avc protect func: %w", err)
Expand All @@ -287,7 +287,7 @@ func InitProtect(init *InitSegment, key, iv []byte, scheme string, kid UUID, pss
}

default:
return nil, fmt.Errorf("visual sample entry type %s not yet supported", se.Type())
return nil, fmt.Errorf("visual sample entry type %s not yet supported", veType)
}
case *AudioSampleEntryBox:
aeType := se.Type()
Expand Down

0 comments on commit ce2a79c

Please sign in to comment.