1.修复读取ts中aac格式数据多次flush问题

2.修复subscribe结束时判断IsClosed调用对象错误
3.增加DefaultYaml功能
This commit is contained in:
dexter
2023-01-03 18:55:32 +08:00
parent fcf4b36c07
commit 5b51e8c494
7 changed files with 27 additions and 17 deletions

View File

@@ -87,8 +87,8 @@ func (t *TSPublisher) OnPES(pes mpegts.MpegTsPESPacket) {
t.AudioTrack.WriteSlice(pes.Payload[7:frameLen])
pes.Payload = pes.Payload[frameLen:remainLen]
remainLen -= frameLen
t.AudioTrack.Flush()
}
t.AudioTrack.Flush()
case *track.G711:
t.AudioTrack.WriteRaw(uint32(pes.Header.Pts), pes.Payload)
}