Fix RTSP server handler for some Cloud clients #347
This commit is contained in:
@@ -136,6 +136,10 @@ func MarshalSDP(name string, medias []*Media) ([]byte, error) {
|
|||||||
}
|
}
|
||||||
md.WithCodec(codec.PayloadType, name, codec.ClockRate, codec.Channels, codec.FmtpLine)
|
md.WithCodec(codec.PayloadType, name, codec.ClockRate, codec.Channels, codec.FmtpLine)
|
||||||
|
|
||||||
|
if media.ID != "" {
|
||||||
|
md.WithValueAttribute("control", media.ID)
|
||||||
|
}
|
||||||
|
|
||||||
sd.MediaDescriptions = append(sd.MediaDescriptions, md)
|
sd.MediaDescriptions = append(sd.MediaDescriptions, md)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ func (c *Conn) Accept() error {
|
|||||||
res := &tcp.Response{
|
res := &tcp.Response{
|
||||||
Status: "401 Unauthorized",
|
Status: "401 Unauthorized",
|
||||||
Header: map[string][]string{"Www-Authenticate": {`Basic realm="go2rtc"`}},
|
Header: map[string][]string{"Www-Authenticate": {`Basic realm="go2rtc"`}},
|
||||||
|
Request: req,
|
||||||
}
|
}
|
||||||
if err = c.WriteResponse(res); err != nil {
|
if err = c.WriteResponse(res); err != nil {
|
||||||
return err
|
return err
|
||||||
|
|||||||
Reference in New Issue
Block a user