修复std::move后智能指针无效的问题

This commit is contained in:
xiongziliang 2020-10-10 18:44:48 +08:00
parent 209689121a
commit 2965248346
2 changed files with 4 additions and 2 deletions

View File

@ -153,7 +153,8 @@ public:
} }
} }
bool key = pkt->isVideoKeyFrame(); bool key = pkt->isVideoKeyFrame();
PacketCache<RtmpPacket>::inputPacket(pkt->type_id == MSG_VIDEO, std::move(pkt), key); bool is_video = pkt->type_id == MSG_VIDEO;
PacketCache<RtmpPacket>::inputPacket(is_video, std::move(pkt), key);
} }
/** /**

View File

@ -182,7 +182,8 @@ public:
regist(); regist();
} }
} }
PacketCache<RtpPacket>::inputPacket(rtp->type == TrackVideo, std::move(rtp), keyPos); bool is_video = rtp->type == TrackVideo;
PacketCache<RtpPacket>::inputPacket(is_video, std::move(rtp), keyPos);
} }
void clearCache() override{ void clearCache() override{