mirror of
https://gitee.com/xia-chu/ZLMediaKit.git
synced 2026-05-23 01:57:50 +08:00
update src/Record/MP4Recorder.cpp.
This commit is contained in:
parent
50b78e204b
commit
23494a9053
@ -118,12 +118,7 @@ bool MP4Recorder::inputFrame(const Frame::Ptr &frame) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (_muxer) {
|
if (_muxer) {
|
||||||
if (_last_dts==0)
|
_info.time_len = (float) (::time(NULL) - info.start_time);
|
||||||
{
|
|
||||||
_last_dts = frame->dts();
|
|
||||||
}
|
|
||||||
auto duration = frame->dts() - _last_dts;
|
|
||||||
_info.time_len = int(duration/1000); //记录上一帧
|
|
||||||
//生成mp4文件
|
//生成mp4文件
|
||||||
return _muxer->inputFrame(frame);
|
return _muxer->inputFrame(frame);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user