Skip to content

Commit

Permalink
sdp: just validate version, don't store it
Browse files Browse the repository at this point in the history
RFC 8866 only specifies 1 valid version, version 0, so that's all we
really need to support. We can still validate it as we need to read
the version lien at some point.
  • Loading branch information
ollytom committed Jul 1, 2024
1 parent 552a668 commit 6222531
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions sdp/sdp.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@ import (
)

type Session struct {
Version int
Origin Origin
Name string
Origin Origin
Name string

Info string
URI *url.URL
Expand Down Expand Up @@ -60,9 +59,8 @@ First:
return nil, fmt.Errorf("parse version: %w", err)
}
if i != 0 {
return nil, fmt.Errorf("parse version: unsupported version %d", i)
return nil, fmt.Errorf("unsupported version %d", i)
}
session.Version = i
next = "o"
case "o":
o, err := parseOrigin(v)
Expand Down

0 comments on commit 6222531

Please sign in to comment.