Pass the correct renderer to EGLImageFactory

We should be using the EGL renderer's colorspace and color range
rather than the backend renderer's for fallbacks. The former is
what actually gets passed to the host PC during stream init.
This commit is contained in:
Cameron Gutman
2026-08-06 00:29:53 -05:00
parent c1623ff44e
commit 7cf8b46c79
8 changed files with 28 additions and 18 deletions
+3 -5
View File
@@ -163,9 +163,6 @@ DrmRenderer::DrmRenderer(AVHWDeviceType hwDeviceType, IFFmpegRenderer *backendRe
m_OutputRect{},
m_SwFrameMapper(this),
m_CurrentSwFrameIdx(0)
#ifdef HAVE_EGL
, m_EglImageFactory(this)
#endif
{
SDL_zero(m_SwFrame);
}
@@ -2100,9 +2097,10 @@ AVPixelFormat DrmRenderer::getEGLImagePixelFormat() {
return AV_PIX_FMT_DRM_PRIME;
}
bool DrmRenderer::initializeEGL(EGLDisplay display,
bool DrmRenderer::initializeEGL(IFFmpegRenderer* eglRenderer,
EGLDisplay display,
const EGLExtensions &ext) {
return m_EglImageFactory.initializeEGL(display, ext);
return m_EglImageFactory.initializeEGL(eglRenderer, display, ext);
}
ssize_t DrmRenderer::exportEGLImages(AVFrame *frame, EGLDisplay dpy,