mirror of
https://github.com/aler9/gortsplib
synced 2025-10-06 07:37:07 +08:00
prevent wrong results in format comparisons or when formats are used as keys (#673)
This commit is contained in:
@@ -6,7 +6,12 @@ import (
|
||||
|
||||
// MPEGTS is the RTP format for MPEG-TS.
|
||||
// Specification: https://datatracker.ietf.org/doc/html/rfc2250
|
||||
type MPEGTS struct{}
|
||||
type MPEGTS struct {
|
||||
// in Go, empty structs share the same pointer,
|
||||
// therefore they cannot be used as map keys
|
||||
// or in equality operations. Prevent this.
|
||||
unused int //nolint:unused
|
||||
}
|
||||
|
||||
func (f *MPEGTS) unmarshal(_ *unmarshalContext) error {
|
||||
return nil
|
||||
|
Reference in New Issue
Block a user