streaming

Media streaming and broadcast systems in Go
Log | Files | Refs | README | LICENSE

commit 375ab26456385a2a2b18b4ee34707997af2bfa0f
parent a5dbf39878dda31b7eb1688c39bd9c81b074e1b1
Author: Oliver Lowe <o@olowe.co>
Date:   Thu, 18 Jul 2024 22:56:15 +1000

sdp: compatible timestamp type

Sorry - typo

Diffstat:
Msdp/encode.go | 2+-
Msdp/sdp.go | 2+-
Msdp/time.go | 4++--
3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/sdp/encode.go b/sdp/encode.go @@ -5,7 +5,7 @@ import ( "strings" ) -func (s *Session) String() string { +func (s Session) String() string { buf := &strings.Builder{} fmt.Fprintln(buf, "v=0") fmt.Fprintf(buf, "o=%s %d %d IN %s %s\n", s.Origin.Username, s.Origin.ID, s.Origin.Version, s.Origin.AddressType, s.Origin.Address) diff --git a/sdp/sdp.go b/sdp/sdp.go @@ -64,7 +64,7 @@ type Origin struct { // almost always a literal IPv4 or IPv6 address such as // "192.0.2.1" or "2001:db8::1". // TODO(otl): is a hostname valid? if not, use netip.Addr, then can drop AddressType. - Address string // IPv4, IPv6 literal or a hostname + Address string } func ReadSession(rd io.Reader) (*Session, error) { diff --git a/sdp/time.go b/sdp/time.go @@ -146,6 +146,6 @@ func parseAdjustments(line string) ([]TimeAdjustment, error) { // Now returns the current SDP timestamp; the number of seconds // since 1900-01-01T00:00Z. -func Now() int64 { - return time.Now().Unix() + sinceTimeZero +func Now() int { + return int(time.Now().Unix() + sinceTimeZero) }