update src/Record/MP4Recorder.cpp.

This commit is contained in:
Leon 2022-07-19 12:13:46 +00:00 committed by Gitee
parent 50b78e204b
commit 23494a9053
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -118,12 +118,7 @@ bool MP4Recorder::inputFrame(const Frame::Ptr &frame) {
}
if (_muxer) {
if (_last_dts==0)
{
_last_dts = frame->dts();
}
auto duration = frame->dts() - _last_dts;
_info.time_len = int(duration/1000); //记录上一帧
_info.time_len = (float) (::time(NULL) - info.start_time);
//生成mp4文件
return _muxer->inputFrame(frame);
}