diff --git a/vendor/github.com/pixelbender/go-sdp/sdp/decoder.go b/vendor/github.com/pixelbender/go-sdp/sdp/decoder.go index bfa465b1..34fa2d45 100644 --- a/vendor/github.com/pixelbender/go-sdp/sdp/decoder.go +++ b/vendor/github.com/pixelbender/go-sdp/sdp/decoder.go @@ -247,11 +247,8 @@ func (d *Decoder) origin(v string) (*Origin, error) { return nil, errFormat } o := new(Origin) - o.Username, o.Network, o.Type, o.Address = p[0], p[3], p[4], p[5] + o.Username, o.SessionID, o.Network, o.Type, o.Address = p[0], p[1], p[3], p[4], p[5] var err error - if o.SessionID, err = d.int(p[1]); err != nil { - return nil, err - } if o.SessionVersion, err = d.int(p[2]); err != nil { return nil, err } diff --git a/vendor/github.com/pixelbender/go-sdp/sdp/encoder.go b/vendor/github.com/pixelbender/go-sdp/sdp/encoder.go index 2ae52055..4ab847d3 100644 --- a/vendor/github.com/pixelbender/go-sdp/sdp/encoder.go +++ b/vendor/github.com/pixelbender/go-sdp/sdp/encoder.go @@ -203,7 +203,7 @@ func (e *Encoder) key(k *Key) *Encoder { } func (e *Encoder) origin(o *Origin) *Encoder { - return e.str(strd(o.Username, "-")).sp().int(o.SessionID).sp().int(o.SessionVersion).sp().transport(o.Network, o.Type, o.Address) + return e.str(strd(o.Username, "-")).sp().str(o.SessionID).sp().int(o.SessionVersion).sp().transport(o.Network, o.Type, o.Address) } func (e *Encoder) connection(c *Connection) *Encoder { diff --git a/vendor/github.com/pixelbender/go-sdp/sdp/sdp.go b/vendor/github.com/pixelbender/go-sdp/sdp/sdp.go index 42d7b9e8..c44d4365 100644 --- a/vendor/github.com/pixelbender/go-sdp/sdp/sdp.go +++ b/vendor/github.com/pixelbender/go-sdp/sdp/sdp.go @@ -40,8 +40,18 @@ func (s *Session) Bytes() []byte { // Origin represents an originator of the session. type Origin struct { - Username string - SessionID int64 + Username string + /** + is a numeric string such that the tuple of , + , , , and forms a + globally unique identifier for the session. The method of + allocation is up to the creating tool, but it has been + suggested that a Network Time Protocol (NTP) format timestamp be + used to ensure uniqueness [13]. + + some IPC do is a string. ie. o=RTSP Session 0 0 IN IP4 0.0.0.0 + */ + SessionID string SessionVersion int64 Network string Type string @@ -137,7 +147,7 @@ func NegotiateMode(local, remote string) string { } // DeleteAttr removes all elements with name from attrs. -func DeleteAttr(attrs Attributes, name ... string) Attributes { +func DeleteAttr(attrs Attributes, name ...string) Attributes { n := 0 loop: for _, it := range attrs {