mirror of
https://github.com/aler9/gortsplib
synced 2025-10-05 15:16:51 +08:00
fix race condition when calling format.Clone()
This commit is contained in:
@@ -181,8 +181,8 @@ func (t *H264) Marshal() (string, string) {
|
|||||||
func (t *H264) Clone() Format {
|
func (t *H264) Clone() Format {
|
||||||
return &H264{
|
return &H264{
|
||||||
PayloadTyp: t.PayloadTyp,
|
PayloadTyp: t.PayloadTyp,
|
||||||
SPS: t.SPS,
|
SPS: t.SafeSPS(),
|
||||||
PPS: t.PPS,
|
PPS: t.SafePPS(),
|
||||||
PacketizationMode: t.PacketizationMode,
|
PacketizationMode: t.PacketizationMode,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -121,9 +121,9 @@ func (t *H265) Marshal() (string, string) {
|
|||||||
func (t *H265) Clone() Format {
|
func (t *H265) Clone() Format {
|
||||||
return &H265{
|
return &H265{
|
||||||
PayloadTyp: t.PayloadTyp,
|
PayloadTyp: t.PayloadTyp,
|
||||||
VPS: t.VPS,
|
VPS: t.SafeVPS(),
|
||||||
SPS: t.SPS,
|
SPS: t.SafeSPS(),
|
||||||
PPS: t.PPS,
|
PPS: t.SafePPS(),
|
||||||
MaxDONDiff: t.MaxDONDiff,
|
MaxDONDiff: t.MaxDONDiff,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user