-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnal_deepcopy.go
28 lines (26 loc) · 1.14 KB
/
nal_deepcopy.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// generated by deep-copy -o nal_deepcopy.go --type NAL .; DO NOT EDIT.
package h264parse
// DeepCopy generates a deep copy of NAL
func (o NAL) DeepCopy() NAL {
var cp NAL = o
if o.RBSPByte != nil {
cp.RBSPByte = make([]byte, len(o.RBSPByte))
copy(cp.RBSPByte, o.RBSPByte)
}
if o.HeaderBytes != nil {
cp.HeaderBytes = make([]byte, len(o.HeaderBytes))
copy(cp.HeaderBytes, o.HeaderBytes)
}
cp.SPS = o.SPS.DeepCopy()
cp.PPS = o.PPS.DeepCopy()
cp.SEI = o.SEI.DeepCopy()
if o.VUI.NALHRDParameters.AlternativeCPBSpecifications != nil {
cp.VUI.NALHRDParameters.AlternativeCPBSpecifications = make([]AlternativeCPBSpecification, len(o.VUI.NALHRDParameters.AlternativeCPBSpecifications))
copy(cp.VUI.NALHRDParameters.AlternativeCPBSpecifications, o.VUI.NALHRDParameters.AlternativeCPBSpecifications)
}
if o.VUI.VCLHRDParameters.AlternativeCPBSpecifications != nil {
cp.VUI.VCLHRDParameters.AlternativeCPBSpecifications = make([]AlternativeCPBSpecification, len(o.VUI.VCLHRDParameters.AlternativeCPBSpecifications))
copy(cp.VUI.VCLHRDParameters.AlternativeCPBSpecifications, o.VUI.VCLHRDParameters.AlternativeCPBSpecifications)
}
return cp
}