支持自动生成adts头

This commit is contained in:
xiongziliang
2018-08-29 11:19:00 +08:00
parent d731454531
commit 370d31121c
7 changed files with 64 additions and 28 deletions

View File

@@ -208,18 +208,12 @@ inline bool HttpSession::checkLiveFlvStream(){
m_mediaInfo.m_streamid.erase(m_mediaInfo.m_streamid.size() - 4);//去除.flv后缀
auto mediaSrc = dynamic_pointer_cast<RtmpMediaSource>(MediaSource::find(RTMP_SCHEMA,m_mediaInfo.m_vhost,m_mediaInfo.m_app,m_mediaInfo.m_streamid));
if(!mediaSrc){
if(!mediaSrc || !mediaSrc->ready()){
//该rtmp源不存在
sendNotFound(true);
shutdown();
return true;
}
if(!mediaSrc->ready()){
//未准备好
sendNotFound(true);
shutdown();
return true;
}
auto onRes = [this,mediaSrc](const string &err){
bool authSuccess = err.empty();