mirror of
https://github.com/Monibuca/plugin-gb28181.git
synced 2025-12-24 13:27:57 +08:00
修改start和end默认为空时t=传值错误
This commit is contained in:
@@ -253,6 +253,8 @@ f字段中视、音频参数段之间不需空格分割。
|
||||
可使用f字段中的分辨率参数标识同一设备不同分辨率的码流。
|
||||
*/
|
||||
func (d *Device) Invite(channelIndex int, start, end string) int {
|
||||
sint, _ := strconv.Atoi(start)
|
||||
eint, _ := strconv.Atoi(end)
|
||||
channel := d.Channels[channelIndex]
|
||||
var publisher Publisher
|
||||
publisher.Type = "GB28181"
|
||||
@@ -286,7 +288,7 @@ func (d *Device) Invite(channelIndex int, start, end string) int {
|
||||
"s=" + s,
|
||||
"u=" + channel.DeviceID + ":0",
|
||||
"c=IN IP4 " + d.SipIP,
|
||||
fmt.Sprintf("t=%s %s", start, end),
|
||||
fmt.Sprintf("t=%d %d", sint, eint),
|
||||
fmt.Sprintf("m=video %d RTP/AVP 96 97 98", config.MediaPort),
|
||||
"a=recvonly",
|
||||
"a=rtpmap:96 PS/90000",
|
||||
|
||||
Reference in New Issue
Block a user