mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-26 12:37:09 +08:00
兼容最后一帧时间戳等于sps pps时间戳的的异常流
This commit is contained in:
parent
1b4f5313f2
commit
821b0e4bb6
@ -203,8 +203,8 @@ bool FrameMerger::willFlush(const Frame::Ptr &frame) const{
|
|||||||
//缓存中没有有效的能解码的帧,所以这次不flush
|
//缓存中没有有效的能解码的帧,所以这次不flush
|
||||||
return _frame_cache.size() > kMaxFrameCacheSize;
|
return _frame_cache.size() > kMaxFrameCacheSize;
|
||||||
}
|
}
|
||||||
if (_frame_cache.back()->dts() != frame->dts() || frame->decodeAble()) {
|
if (_frame_cache.back()->dts() != frame->dts() || frame->decodeAble() || frame->configFrame()) {
|
||||||
//时间戳变化了,或新的一帧,立即flush
|
//时间戳变化了,或新的一帧,或遇到config帧,立即flush
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return _frame_cache.size() > kMaxFrameCacheSize;
|
return _frame_cache.size() > kMaxFrameCacheSize;
|
||||||
|
Loading…
Reference in New Issue
Block a user