优化GOP相关逻辑

This commit is contained in:
xiongziliang
2020-01-20 16:22:25 +08:00
parent f453668683
commit f5187e8b0d
6 changed files with 12 additions and 9 deletions

View File

@@ -72,6 +72,8 @@ private:
}
void onRecvRTP(const RtpPacket::Ptr &rtp, const SdpTrack::Ptr &track) override {
if(_pRtspMediaSrc){
// rtsp直接代理是无法判断该rtp是否是I帧所以GOP缓存基本是无效的
// 为了减少内存使用那么我们设置为一直关键帧以便清空GOP缓存
_pRtspMediaSrc->onWrite(rtp,true);
}
_delegate->inputRtp(rtp);