fix race condition when calling format.Clone()

This commit is contained in:
aler9
2022-12-13 17:10:01 +01:00
parent 0f87a1cf41
commit 50d6b2e916
2 changed files with 5 additions and 5 deletions

View File

@@ -181,8 +181,8 @@ func (t *H264) Marshal() (string, string) {
func (t *H264) Clone() Format {
return &H264{
PayloadTyp: t.PayloadTyp,
SPS: t.SPS,
PPS: t.PPS,
SPS: t.SafeSPS(),
PPS: t.SafePPS(),
PacketizationMode: t.PacketizationMode,
}
}

View File

@@ -121,9 +121,9 @@ func (t *H265) Marshal() (string, string) {
func (t *H265) Clone() Format {
return &H265{
PayloadTyp: t.PayloadTyp,
VPS: t.VPS,
SPS: t.SPS,
PPS: t.PPS,
VPS: t.SafeVPS(),
SPS: t.SafeSPS(),
PPS: t.SafePPS(),
MaxDONDiff: t.MaxDONDiff,
}
}