修复resetTracks情况下 MP4录制可能出现的bug

This commit is contained in:
xiongziliang
2019-10-16 11:10:20 +08:00
parent 68d29ba025
commit 3bad329f09
2 changed files with 13 additions and 0 deletions

View File

@@ -153,6 +153,14 @@ void MP4Recorder::onTrackReady(const Track::Ptr & track){
}
}
void MP4Recorder::resetTracks() {
closeFile();
_tracks.clear();
_haveVideo = false;
_createFileTicker.resetTime();
MediaSink::resetTracks();
}
} /* namespace mediakit */