mirror of
https://github.com/lkmio/lkm.git
synced 2025-09-26 19:21:14 +08:00
fix: 国标级联转发失败问题
This commit is contained in:
@@ -102,6 +102,8 @@ func (api *ApiServer) OnGBSourceCreate(v *SourceSDP, w http.ResponseWriter, r *h
|
||||
response.Addr = net.JoinHostPort(stream.AppConfig.PublicIP, strconv.Itoa(port))
|
||||
response.Urls = stream.GetStreamPlayUrls(v.Source)
|
||||
response.SSRC = ssrc
|
||||
|
||||
log.Sugar.Infof("创建国标源成功, addr: %s, ssrc: %d", response.Addr, ssrcValue)
|
||||
httpResponseOK(w, response)
|
||||
}
|
||||
|
||||
|
@@ -472,7 +472,7 @@ func (s *PublishSource) doAddSink(sink Sink, resume bool) bool {
|
||||
}
|
||||
|
||||
// 新建传输流,发送已经缓存的音视频帧
|
||||
if !exist && AppConfig.GOPCache && s.existVideo {
|
||||
if !exist && AppConfig.GOPCache && s.existVideo && TransStreamGBCascadedForward != transStream.GetProtocol() {
|
||||
s.DispatchGOPBuffer(transStream)
|
||||
}
|
||||
|
||||
@@ -828,7 +828,9 @@ func (s *PublishSource) OnPacket(packet *avformat.AVPacket) {
|
||||
|
||||
// 分发给各个传输流
|
||||
for _, transStream := range s.TransStreams {
|
||||
s.DispatchPacket(transStream, packet)
|
||||
if TransStreamGBCascadedForward != transStream.GetProtocol() {
|
||||
s.DispatchPacket(transStream, packet)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user