Fix pending frame leak on destruction

This commit is contained in:
Cameron Gutman
2026-01-05 19:15:58 -06:00
parent 705cd3ddc4
commit 70d4f24455

View File

@@ -220,6 +220,7 @@ class DrmRenderer : public IFFmpegRenderer {
for (auto it = m_PlaneBuffers.begin(); it != m_PlaneBuffers.end(); it++) {
SDL_assert(!it->second.fbId);
SDL_assert(!it->second.dumbBufferHandle);
SDL_assert(!it->second.pendingFrame);
if (it->second.pendingFbId) {
drmModeRmFB(m_Fd, it->second.pendingFbId);
@@ -229,6 +230,7 @@ class DrmRenderer : public IFFmpegRenderer {
destroyBuf.handle = it->second.pendingDumbBuffer;
drmIoctl(m_Fd, DRM_IOCTL_MODE_DESTROY_DUMB, &destroyBuf);
}
av_frame_free(&it->second.pendingFrame);
}
if (m_AtomicReq) {