mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-28 21:52:22 +08:00
完善rtmp关键帧与配置帧判断逻辑
This commit is contained in:
@@ -21,9 +21,6 @@ static string getAacCfg(const RtmpPacket &thiz) {
|
||||
if ((RtmpAudioCodec)thiz.getRtmpCodecId() != RtmpAudioCodec::aac) {
|
||||
return ret;
|
||||
}
|
||||
if (!thiz.isCfgFrame()) {
|
||||
return ret;
|
||||
}
|
||||
if (thiz.buffer.size() < 4) {
|
||||
WarnL << "get aac config failed, rtmp packet is: " << hexdump(thiz.data(), thiz.size());
|
||||
return ret;
|
||||
|
||||
@@ -33,9 +33,6 @@ static bool getH264Config(const RtmpPacket &thiz, string &sps, string &pps) {
|
||||
if ((RtmpVideoCodec)thiz.getRtmpCodecId() != RtmpVideoCodec::h264) {
|
||||
return false;
|
||||
}
|
||||
if (!thiz.isCfgFrame()) {
|
||||
return false;
|
||||
}
|
||||
if (thiz.buffer.size() < 13) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -53,9 +53,6 @@ static bool getH265ConfigFrame(const RtmpPacket &thiz, string &frame) {
|
||||
if ((RtmpVideoCodec)thiz.getRtmpCodecId() != RtmpVideoCodec::h265) {
|
||||
return false;
|
||||
}
|
||||
if (!thiz.isCfgFrame()) {
|
||||
return false;
|
||||
}
|
||||
if (thiz.buffer.size() < 6) {
|
||||
WarnL << "bad H265 cfg!";
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user