/index/api/stack/reset 在相同url和通分辨率多次调用channel析构没画面的问题

This commit is contained in:
sbkyy 2024-10-24 17:38:10 +08:00
parent 4c90a1a95b
commit 04a10d70b3

View File

@ -23,7 +23,11 @@
INSTANCE_IMP(VideoStackManager)
Param::~Param() { VideoStackManager::Instance().unrefChannel(id, width, height, pixfmt); }
Param::~Param() {
auto strongChn= weak_chn.lock();
if (!strongChn) { return; }
VideoStackManager::Instance().unrefChannel(id, width, height, pixfmt);
}
Channel::Channel(const std::string& id, int width, int height, AVPixelFormat pixfmt)
: _id(id), _width(width), _height(height), _pixfmt(pixfmt) {