mirror of
https://github.com/moonlight-stream/moonlight-qt
synced 2025-01-09 09:48:43 +00:00
Don't export EGLImages for software frames
This commit is contained in:
parent
5711e6064e
commit
0dd0112518
1 changed files with 6 additions and 1 deletions
|
@ -1158,8 +1158,13 @@ bool DrmRenderer::initializeEGL(EGLDisplay display,
|
||||||
|
|
||||||
ssize_t DrmRenderer::exportEGLImages(AVFrame *frame, EGLDisplay dpy,
|
ssize_t DrmRenderer::exportEGLImages(AVFrame *frame, EGLDisplay dpy,
|
||||||
EGLImage images[EGL_MAX_PLANES]) {
|
EGLImage images[EGL_MAX_PLANES]) {
|
||||||
AVDRMFrameDescriptor* drmFrame = (AVDRMFrameDescriptor*)frame->data[0];
|
if (frame->format != AV_PIX_FMT_DRM_PRIME) {
|
||||||
|
SDL_LogWarn(SDL_LOG_CATEGORY_APPLICATION,
|
||||||
|
"EGLImage export requires hardware-backed frames");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
AVDRMFrameDescriptor* drmFrame = (AVDRMFrameDescriptor*)frame->data[0];
|
||||||
return m_EglImageFactory.exportDRMImages(frame, drmFrame, dpy, images);
|
return m_EglImageFactory.exportDRMImages(frame, drmFrame, dpy, images);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue