mirror of
https://github.com/lkmio/lkm.git
synced 2025-10-04 06:46:24 +08:00
fix: rtp打包vps/sps/pps未删除startcode问题
This commit is contained in:
@@ -133,13 +133,13 @@ func (t *TransStream) AddTrack(track *stream.Track) error {
|
|||||||
|
|
||||||
if utils.AVCodecIdH265 == track.Stream.CodecId() {
|
if utils.AVCodecIdH265 == track.Stream.CodecId() {
|
||||||
bytes := parameters.(*utils.HEVCCodecData).VPS()
|
bytes := parameters.(*utils.HEVCCodecData).VPS()
|
||||||
t.PackRtpPayload(rtspTrack, index, bytes[0], 0)
|
t.PackRtpPayload(rtspTrack, index, libavc.RemoveStartCode(bytes[0]), 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
spsBytes := parameters.SPS()
|
spsBytes := parameters.SPS()
|
||||||
ppsBytes := parameters.PPS()
|
ppsBytes := parameters.PPS()
|
||||||
t.PackRtpPayload(rtspTrack, index, spsBytes[0], 0)
|
t.PackRtpPayload(rtspTrack, index, libavc.RemoveStartCode(spsBytes[0]), 0)
|
||||||
t.PackRtpPayload(rtspTrack, index, ppsBytes[0], 0)
|
t.PackRtpPayload(rtspTrack, index, libavc.RemoveStartCode(ppsBytes[0]), 0)
|
||||||
|
|
||||||
// 拷贝扩展数据的rtp包
|
// 拷贝扩展数据的rtp包
|
||||||
size := t.buffer.Index() - bufferIndex
|
size := t.buffer.Index() - bufferIndex
|
||||||
|
Reference in New Issue
Block a user