mirror of
https://github.com/Monibuca/engine.git
synced 2025-10-26 18:00:25 +08:00
rtp补完
This commit is contained in:
@@ -4,10 +4,11 @@ import (
|
||||
"bytes"
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/Monibuca/engine/v4/util"
|
||||
"github.com/Monibuca/engine/v4/codec"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
|
||||
"github.com/Monibuca/engine/v4/codec"
|
||||
"github.com/Monibuca/engine/v4/util"
|
||||
)
|
||||
|
||||
// ios13818-1-CN.pdf 45/166
|
||||
@@ -582,7 +583,7 @@ func CheckPESPacketIsKeyFrame(packet MpegTsPESPacket) bool {
|
||||
nalus := bytes.SplitN(packet.Payload, codec.NALU_Delimiter1, -1)
|
||||
|
||||
for _, v := range nalus {
|
||||
if v[0]&0x1f == codec.NALU_IDR_Picture {
|
||||
if codec.H264NALUType.ParseBytes(codec.NALU_IDR_Picture, v) == codec.NALU_IDR_Picture {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user