avoid multi rtmp player metadata

This commit is contained in:
xiongguangjie 2022-07-07 17:44:19 +08:00
parent 16e791b83c
commit 4108e81d2f

View File

@ -99,7 +99,11 @@ private:
if (_rtmp_src) { if (_rtmp_src) {
_rtmp_src->setMetaData(val); _rtmp_src->setMetaData(val);
} }
if(_demuxer){
return;
}
_demuxer = std::make_shared<RtmpDemuxer>(); _demuxer = std::make_shared<RtmpDemuxer>();
//TraceL<<" _wait_track_ready "<<_wait_track_ready;
_demuxer->setTrackListener(this, _wait_track_ready); _demuxer->setTrackListener(this, _wait_track_ready);
_demuxer->loadMetaData(val); _demuxer->loadMetaData(val);
} }