mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-18 06:30:55 +00:00
Fix pending frame leak on destruction
This commit is contained in:
@@ -220,6 +220,7 @@ class DrmRenderer : public IFFmpegRenderer {
|
|||||||
for (auto it = m_PlaneBuffers.begin(); it != m_PlaneBuffers.end(); it++) {
|
for (auto it = m_PlaneBuffers.begin(); it != m_PlaneBuffers.end(); it++) {
|
||||||
SDL_assert(!it->second.fbId);
|
SDL_assert(!it->second.fbId);
|
||||||
SDL_assert(!it->second.dumbBufferHandle);
|
SDL_assert(!it->second.dumbBufferHandle);
|
||||||
|
SDL_assert(!it->second.pendingFrame);
|
||||||
|
|
||||||
if (it->second.pendingFbId) {
|
if (it->second.pendingFbId) {
|
||||||
drmModeRmFB(m_Fd, it->second.pendingFbId);
|
drmModeRmFB(m_Fd, it->second.pendingFbId);
|
||||||
@@ -229,6 +230,7 @@ class DrmRenderer : public IFFmpegRenderer {
|
|||||||
destroyBuf.handle = it->second.pendingDumbBuffer;
|
destroyBuf.handle = it->second.pendingDumbBuffer;
|
||||||
drmIoctl(m_Fd, DRM_IOCTL_MODE_DESTROY_DUMB, &destroyBuf);
|
drmIoctl(m_Fd, DRM_IOCTL_MODE_DESTROY_DUMB, &destroyBuf);
|
||||||
}
|
}
|
||||||
|
av_frame_free(&it->second.pendingFrame);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_AtomicReq) {
|
if (m_AtomicReq) {
|
||||||
|
|||||||
Reference in New Issue
Block a user