修复hls由于缓存导致花屏的问题

This commit is contained in:
xiongziliang
2019-07-24 18:40:18 +08:00
parent f50eaf8648
commit 7baa35e594
3 changed files with 101 additions and 2 deletions

View File

@@ -78,7 +78,7 @@ void TsMuxer::inputFrame(const Frame::Ptr &frame) {
mpeg_ts_write(_context, it->second, back->keyFrame() ? 0x0001 : 0, back->pts() * 90LL, back->dts() * 90LL, merged_frame->data(), merged_frame->size());
_frameCached.clear();
}
_frameCached.emplace_back(frame);
_frameCached.emplace_back(Frame::getCacheAbleFrame(frame));
}
break;
default: {