mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-24 11:40:37 +08:00
Merge a41c6a63e4
into 4c90a1a95b
This commit is contained in:
commit
c3a9b9eb07
@ -23,7 +23,11 @@
|
|||||||
|
|
||||||
INSTANCE_IMP(VideoStackManager)
|
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)
|
Channel::Channel(const std::string& id, int width, int height, AVPixelFormat pixfmt)
|
||||||
: _id(id), _width(width), _height(height), _pixfmt(pixfmt) {
|
: _id(id), _width(width), _height(height), _pixfmt(pixfmt) {
|
||||||
@ -278,6 +282,8 @@ void VideoStack::start() {
|
|||||||
|
|
||||||
_dev->inputYUV((char**)_buffer->get()->data, _buffer->get()->linesize, pts);
|
_dev->inputYUV((char**)_buffer->get()->data, _buffer->get()->linesize, pts);
|
||||||
pts += frameInterval;
|
pts += frameInterval;
|
||||||
|
} else {
|
||||||
|
std::this_thread::sleep_for(std::chrono::milliseconds(1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user