整理MediaSource派生类

修复转协议或录制时忽然Track的问题
This commit is contained in:
xiongziliang
2019-12-26 11:53:19 +08:00
parent 806747a9d5
commit 3830792c57
15 changed files with 172 additions and 150 deletions

View File

@@ -122,9 +122,9 @@ public:
/**
* 输入rtmp包
* @param pkt rtmp包
* @param isKey 是否为关键帧
* @param key 是否为关键帧
*/
void onWrite(const RtmpPacket::Ptr &pkt, bool isKey = true) override {
void onWrite(const RtmpPacket::Ptr &pkt, bool key = true) override {
lock_guard<recursive_mutex> lock(_mtx);
if (pkt->isCfgFrame()) {
_config_frame_map[pkt->typeId] = pkt;