修复写两次Track的bug

This commit is contained in:
xiongziliang
2018-10-26 22:07:01 +08:00
parent c03ea1d893
commit affc98f927
3 changed files with 7 additions and 5 deletions

View File

@@ -68,7 +68,6 @@ public:
typedef std::shared_ptr<RtmpRing> Ptr;
RtmpRing(){
_rtmpRing = std::make_shared<RingType>();
}
virtual ~RtmpRing(){}
@@ -81,7 +80,9 @@ public:
}
bool inputRtmp(const RtmpPacket::Ptr &rtmp, bool key_pos) override{
_rtmpRing->write(rtmp,key_pos);
if(_rtmpRing){
_rtmpRing->write(rtmp,key_pos);
}
return key_pos;
}
protected: