修复bug

This commit is contained in:
xiongziliang 2018-10-26 17:30:48 +08:00
parent 097cf273d5
commit 91a766243b
2 changed files with 2 additions and 10 deletions

View File

@ -88,12 +88,8 @@ void RtmpMuxer::inputFrame(const Frame::Ptr &frame) {
if (it == _track_map.end()) { if (it == _track_map.end()) {
return; return;
} }
//Track是否准备好
auto ready = it->second->ready();
//inputFrame可能使Track变成就绪状态
it->second->inputFrame(frame); it->second->inputFrame(frame);
if(!_trackReadyCallback.empty() && it->second->ready()){
if(!ready && it->second->ready()){
//Track由未就绪状态装换成就绪状态我们就生成metedata以及Rtmp编码器 //Track由未就绪状态装换成就绪状态我们就生成metedata以及Rtmp编码器
auto it_callback = _trackReadyCallback.find(codec_id); auto it_callback = _trackReadyCallback.find(codec_id);
if(it_callback != _trackReadyCallback.end()){ if(it_callback != _trackReadyCallback.end()){

View File

@ -77,12 +77,8 @@ void RtspMuxer::inputFrame(const Frame::Ptr &frame) {
if (it == _track_map.end()) { if (it == _track_map.end()) {
return; return;
} }
//Track是否准备好
auto ready = it->second->ready();
//inputFrame可能使Track变成就绪状态
it->second->inputFrame(frame); it->second->inputFrame(frame);
if(!_trackReadyCallback.empty() && it->second->ready()){
if(!ready && it->second->ready()){
//Track由未就绪状态装换成就绪状态我们就生成sdp以及rtp编码器 //Track由未就绪状态装换成就绪状态我们就生成sdp以及rtp编码器
auto it_callback = _trackReadyCallback.find(codec_id); auto it_callback = _trackReadyCallback.find(codec_id);
if(it_callback != _trackReadyCallback.end()){ if(it_callback != _trackReadyCallback.end()){