mirror of
https://github.com/lkmio/lkm.git
synced 2025-10-16 04:00:36 +08:00
修复rtmp推拉流内存泄漏问题
This commit is contained in:
@@ -158,7 +158,7 @@ func (t *transStream) WriteHeader() error {
|
||||
if videoStream != nil {
|
||||
tmp := n
|
||||
n += t.muxer.WriteVideoData(t.header[n+12:], 0, false, true)
|
||||
extra := videoStream.CodecParameters().DecoderConfRecord().ToMP4VC()
|
||||
extra := videoStream.CodecParameters().MP4ExtraData()
|
||||
copy(t.header[n+12:], extra)
|
||||
n += len(extra)
|
||||
|
||||
@@ -179,6 +179,7 @@ func (t *transStream) Close() error {
|
||||
if len(segment) > 0 {
|
||||
t.SendPacket(segment)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user