Skip to content

Commit

Permalink
fix: make encryption work also for avc3
Browse files Browse the repository at this point in the history
  • Loading branch information
tobbee committed Jan 18, 2024
1 parent 28f71a5 commit c51790a
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 c51790a

Please sign in to comment.