mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-18 22:50:57 +00:00
Hoist the logic to keep an AVFrame reference up to Pacer
This commit is contained in:
@@ -1396,7 +1396,7 @@ void DrmRenderer::notifyOverlayUpdated(Overlay::OverlayType type)
|
||||
// Queue the plane flip with the new FB
|
||||
//
|
||||
// NB: This takes ownership of the FB and dumb buffer, even on failure
|
||||
m_PropSetter.flipPlane(m_OverlayPlanes[type], fbId, dumbBuffer, nullptr);
|
||||
m_PropSetter.flipPlane(m_OverlayPlanes[type], fbId, dumbBuffer);
|
||||
|
||||
SDL_FreeSurface(newSurface);
|
||||
}
|
||||
@@ -1657,11 +1657,10 @@ void DrmRenderer::renderFrame(AVFrame* frame)
|
||||
//
|
||||
// NB: This takes ownership of fbId, even on failure
|
||||
//
|
||||
// NB2: We reference the AVFrame (which also references the AVBuffers backing the frame itself
|
||||
// NB2: Pacer references the AVFrame (which also references the AVBuffers backing the frame
|
||||
// and the opaque_ref which may store our DRM-PRIME mapping) for frames backed by DMA-BUFs in
|
||||
// order to keep those from being reused by the decoder while they're still being scanned out.
|
||||
m_PropSetter.flipPlane(m_VideoPlane, fbId, 0,
|
||||
(m_DrmPrimeBackend || frame->format == AV_PIX_FMT_DRM_PRIME) ? frame : nullptr);
|
||||
m_PropSetter.flipPlane(m_VideoPlane, fbId, 0);
|
||||
|
||||
// Apply pending atomic transaction (if in atomic mode)
|
||||
m_PropSetter.apply();
|
||||
|
||||
Reference in New Issue
Block a user