From 6188118ef697f112ba5d39c00d4da905e2a5c045 Mon Sep 17 00:00:00 2001 From: zhouyun Date: Tue, 25 May 2021 16:25:42 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9start=E5=92=8Cend=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E4=B8=BA=E7=A9=BA=E6=97=B6t=3D=E4=BC=A0=E5=80=BC?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- device.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/device.go b/device.go index 5a32f99..98a7111 100644 --- a/device.go +++ b/device.go @@ -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",