diff --git a/plugin/crypto/pkg/transform.go b/plugin/crypto/pkg/transform.go index 71e0d06..46d9336 100644 --- a/plugin/crypto/pkg/transform.go +++ b/plugin/crypto/pkg/transform.go @@ -157,8 +157,9 @@ func (t *Transform) Go() error { } } if needEncrypt { - if encBytes, err := t.cryptor.Encrypt(mem); err == nil { - copyVideo.Nalus.Append(encBytes) + encBytes, err := t.cryptor.Encrypt(mem[2:]) + if err == nil { + copyVideo.Nalus.Append(append([]byte{mem[0], mem[1]}, encBytes...)) } else { copyVideo.Nalus.Append(mem) }