- 【C++】编码传输:创建零拷贝帧对象3: dll api转换内部的共享内存
根本原因
- 你想要的是基于
packet
指向的那个已有对象,拷贝(或移动)出一个新的VideoDataPacket3
实例,因此需要把那个对象本身传进去——也就是*packet
。
copilot的原因分析与gpt一致
The issue is with the std::make_unique function, which requires a template parameter. When you write std::make_unique(packet), the compiler doesn’t know what type of object to create.
To fix this code:
// Fixed: std::make_unique r