diff --git a/format/rtsp/sdp/parser.go b/format/rtsp/sdp/parser.go index 6faf909..064abaa 100644 --- a/format/rtsp/sdp/parser.go +++ b/format/rtsp/sdp/parser.go @@ -47,6 +47,8 @@ func Parse(content string) (sess Session, medias []Media) { if len(mfields) >= 3 { media.PayloadType, _ = strconv.Atoi(mfields[2]) } + default: + media = nil } } @@ -110,8 +112,6 @@ func Parse(content string) (sess Session, medias []Media) { } } - default: - media = nil } }