streaming

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

commit 62225314d11e4654e030d4474457775ba6dcb0dc
parent 552a66880ad7af7ce00fbf171748c9daee67c684
Author: Oliver Lowe <o@olowe.co>
Date:   Mon,  1 Jul 2024 19:45:58 +1000

sdp: just validate version, don't store it

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.

Diffstat:
Msdp/sdp.go | 8+++-----
1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/sdp/sdp.go b/sdp/sdp.go @@ -14,9 +14,8 @@ import ( ) type Session struct { - Version int - Origin Origin - Name string + Origin Origin + Name string Info string URI *url.URL @@ -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)