兼容一些不规范的流

This commit is contained in:
xiongziliang
2021-02-28 20:58:30 +08:00
parent 56f044f8ed
commit fb3603b433
3 changed files with 17 additions and 3 deletions

View File

@@ -221,6 +221,10 @@ void H264RtmpEncoder::inputFrame(const Frame::Ptr &frame) {
}
void H264RtmpEncoder::makeVideoConfigPkt() {
if (_sps.size() < 4) {
WarnL << "sps长度不足4字节";
return;
}
int8_t flags = FLV_CODEC_H264;
flags |= (FLV_KEY_FRAME << 4);
bool is_config = true;