mirror of
https://github.com/moonlight-stream/moonlight-qt
synced 2025-01-18 22:13:53 +00:00
Fix use-after-free in VDPAU overlay rendering
This commit is contained in:
parent
027c8dcd41
commit
dcbf5affda
1 changed files with 3 additions and 3 deletions
|
@ -385,9 +385,6 @@ void VDPAURenderer::notifyOverlayUpdated(Overlay::OverlayType type)
|
|||
return;
|
||||
}
|
||||
|
||||
// Surface data is no longer needed
|
||||
SDL_FreeSurface(newSurface);
|
||||
|
||||
VdpRect overlayRect;
|
||||
|
||||
if (type == Overlay::OverlayStatusUpdate) {
|
||||
|
@ -404,6 +401,9 @@ void VDPAURenderer::notifyOverlayUpdated(Overlay::OverlayType type)
|
|||
overlayRect.x1 = overlayRect.x0 + newSurface->w;
|
||||
overlayRect.y1 = overlayRect.y0 + newSurface->h;
|
||||
|
||||
// Surface data is no longer needed
|
||||
SDL_FreeSurface(newSurface);
|
||||
|
||||
SDL_LockMutex(m_OverlayMutex);
|
||||
m_OverlaySurface[type] = newBitmapSurface;
|
||||
m_OverlayRect[type] = overlayRect;
|
||||
|
|
Loading…
Reference in a new issue