mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-26 12:37:09 +08:00
播放flv流时,非AAC与H264编码时,打印警告日志
This commit is contained in:
parent
97528c2583
commit
a9be01fbec
@ -334,6 +334,21 @@ bool HttpSession::checkLiveStreamFlv(const function<void()> &cb){
|
||||
}
|
||||
//直播牺牲延时提升发送性能
|
||||
setSocketFlags();
|
||||
|
||||
//非H264/AAC时打印警告日志,防止用户提无效问题
|
||||
auto tracks = src->getTracks(false);
|
||||
for (auto &track : tracks) {
|
||||
switch (track->getCodecId()) {
|
||||
case CodecH264:
|
||||
case CodecAAC:
|
||||
break;
|
||||
default: {
|
||||
WarnP(this) << "flv播放器一般只支持H264和AAC编码,该编码格式可能不被播放器支持:" << track->getCodecName();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
start(getPoller(), rtmp_src);
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user