mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-27 04:22:20 +08:00
使用临时变量和std::move减少智能指针的拷贝构造
This commit is contained in:
@@ -74,7 +74,7 @@ protected:
|
||||
}
|
||||
FMP4Packet::Ptr packet = std::make_shared<FMP4Packet>(std::move(string));
|
||||
packet->time_stamp = stamp;
|
||||
_media_src->onWrite(packet, key_frame);
|
||||
_media_src->onWrite(std::move(packet), key_frame);
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user