修复首帧不是I帧 导致花屏的问题

This commit is contained in:
xiongziliang
2019-08-02 10:53:00 +08:00
parent 0980bde12d
commit 35c324b6b4
3 changed files with 11 additions and 4 deletions

View File

@@ -89,10 +89,8 @@ void Mp4Maker::createFile() {
try {
_muxer = std::make_shared<MP4MuxerFile>(strFileTmp.data());
for(auto &track :_tracks){
if(track){
//添加track
_muxer->addTrack(track);
}
//添加track
_muxer->addTrack(track);
}
_strFileTmp = strFileTmp;
_strFile = strFile;