diff --git a/CHANGELOG.md b/CHANGELOG.md index 5969d1dc..e7a668a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/mp4/crypto.go b/mp4/crypto.go index 938b5709..ce33bbde 100644 --- a/mp4/crypto.go +++ b/mp4/crypto.go @@ -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) @@ -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()