mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-30 23:02:24 +08:00
BugFix: crash when FrameMerger::flush
In a lambda expression, temporary stack variables should not be captured; otherwise, the variables may have become invalid when FrameMerger::flush is called.
This commit is contained in:
@@ -55,7 +55,7 @@ bool MpegMuxer::inputFrame(const Frame::Ptr &frame) {
|
||||
case CodecH264:
|
||||
case CodecH265: {
|
||||
// 这里的代码逻辑是让SPS、PPS、IDR这些时间戳相同的帧打包到一起当做一个帧处理,
|
||||
return track.merger.inputFrame(frame, [&](uint64_t dts, uint64_t pts, const Buffer::Ptr &buffer, bool have_idr) {
|
||||
return track.merger.inputFrame(frame, [this, &track](uint64_t dts, uint64_t pts, const Buffer::Ptr &buffer, bool have_idr) {
|
||||
_key_pos = have_idr;
|
||||
// 取视频时间戳为TS的时间戳
|
||||
_timestamp = dts;
|
||||
|
||||
Reference in New Issue
Block a user