diff --git a/pkg/base/t_http_an__notify.go b/pkg/base/t_http_an__notify.go index 9e12d59..1058bbd 100644 --- a/pkg/base/t_http_an__notify.go +++ b/pkg/base/t_http_an__notify.go @@ -141,7 +141,7 @@ func session2EventCommonInfo(session ISession) SessionEventCommonInfo { info.Url = session.Url() info.AppName = session.AppName() info.StreamName = session.StreamName() - info.Url = session.Url() + info.UrlParam = session.RawQuery() info.ReadBytesSum = stat.ReadBytesSum info.WroteBytesSum = stat.WroteBytesSum diff --git a/pkg/logic/http_an__lal.html b/pkg/logic/http_an__lal.html index 0297773..4226212 100644 --- a/pkg/logic/http_an__lal.html +++ b/pkg/logic/http_an__lal.html @@ -499,7 +499,8 @@ } function requestGroup() { - httpAsync("/api/stat/group?stream_name="+groupName.innerText, "GET", function(code, resp) { + let gname = encodeURIComponent(groupName.innerText); + httpAsync("/api/stat/group?stream_name="+gname, "GET", function(code, resp) { if(code == 200) { const obj = JSON.parse(resp); for(let index = groupInfoTable.rows.length; index > 0; index--) { diff --git a/pkg/mpegts/pack.go b/pkg/mpegts/pack.go index b4d1ecd..103fe31 100644 --- a/pkg/mpegts/pack.go +++ b/pkg/mpegts/pack.go @@ -116,10 +116,14 @@ func (frame *Frame) Pack() []byte { // reserved // program_clock_reference_extension // -------------------------------------- - packet[3] |= 0x20 // adaptation_field_control 设置Adaptation - packet[4] = 7 // adaptation_field_length - packet[5] = 0x50 // random_access_indicator + PCR_flag - packPcr(packet[6:], frame.Dts-delay) // using 6 byte + packet[3] |= 0x20 // adaptation_field_control 设置Adaptation + packet[4] = 7 // adaptation_field_length + packet[5] = 0x50 // random_access_indicator + PCR_flag + pcr := uint64(0) + if frame.Dts > delay { + pcr = frame.Dts - delay + } + packPcr(packet[6:], pcr) // using 6 byte wpos += 8 }