mirror of
https://github.com/barry-ran/QtScrcpy.git
synced 2025-07-29 12:18:39 +00:00
fix: memory leak on server start failed
This commit is contained in:
parent
9a72d4626f
commit
0403ce2569
1 changed files with 2 additions and 1 deletions
|
@ -23,7 +23,6 @@ Device::Device(DeviceParams params, QObject *parent) : QObject(parent), m_params
|
|||
}
|
||||
|
||||
if (params.display) {
|
||||
|
||||
m_decoder = new Decoder([this](int width, int height, uint8_t* dataY, uint8_t* dataU, uint8_t* dataV, int linesizeY, int linesizeU, int linesizeV) {
|
||||
if (m_videoForm) {
|
||||
m_videoForm->updateRender(width, height, dataY, dataU, dataV, linesizeY, linesizeU, linesizeV);
|
||||
|
@ -296,6 +295,8 @@ void Device::initSignals()
|
|||
if (m_params.closeScreen && m_params.display && m_controller) {
|
||||
emit m_controller->onSetScreenPowerMode(ControlMsg::SPM_OFF);
|
||||
}
|
||||
} else {
|
||||
deleteLater();
|
||||
}
|
||||
});
|
||||
connect(m_server, &Server::onServerStop, this, [this]() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue