Fix pending frame leak on destruction
This commit is contained in:
parent
705cd3ddc4
commit
70d4f24455
1 changed files with 2 additions and 0 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue