Fix dma handling for cuvid with placebo

This commit is contained in:
jojo61 2024-09-03 09:16:45 +02:00
parent f026e8e86d
commit 230bb5ca11
2 changed files with 8 additions and 10 deletions

View File

@ -61,7 +61,7 @@ extern void ToggleLUT();
/// vdr-plugin version number. /// vdr-plugin version number.
/// Makefile extracts the version number for generating the file name /// Makefile extracts the version number for generating the file name
/// for the distribution archive. /// for the distribution archive.
static const char *const VERSION = "3.23" static const char *const VERSION = "3.24"
#ifdef GIT_REV #ifdef GIT_REV
"-GIT" GIT_REV "-GIT" GIT_REV
#endif #endif

16
video.c
View File

@ -1258,19 +1258,17 @@ static void EglExit(void) {
EglCheck(); EglCheck();
eglSurface = NULL; eglSurface = NULL;
} }
if (eglContext) {
eglDestroyContext(eglDisplay, eglContext);
EglCheck();
eglContext = NULL;
}
if (eglSharedContext) { if (eglSharedContext) {
eglDestroyContext(eglDisplay, eglSharedContext); eglDestroyContext(eglDisplay, eglSharedContext);
EglCheck(); EglCheck();
eglSharedContext = NULL; eglSharedContext = NULL;
} }
if (eglContext) {
eglDestroyContext(eglDisplay, eglContext);
EglCheck();
eglContext = NULL;
}
eglTerminate(eglDisplay); eglTerminate(eglDisplay);
eglDisplay = NULL; eglDisplay = NULL;
@ -2287,7 +2285,7 @@ void createTextureDst(CuvidDecoder *decoder, int anz, unsigned int size_x, unsig
&decoder->pl_frames[i].planes[n].texture); // delete old texture &decoder->pl_frames[i].planes[n].texture); // delete old texture
} }
if (p->has_dma_buf == 0) { //if (p->has_dma_buf == 0) {
decoder->pl_frames[i].planes[n].texture = pl_tex_create( decoder->pl_frames[i].planes[n].texture = pl_tex_create(
p->gpu, &(struct pl_tex_params) { p->gpu, &(struct pl_tex_params) {
.w = n == 0 ? size_x : size_x / 2, .h = n == 0 ? size_y : size_y / 2, .d = 0, .format = fmt, .w = n == 0 ? size_x : size_x / 2, .h = n == 0 ? size_y : size_y / 2, .d = 0, .format = fmt,
@ -2299,7 +2297,7 @@ void createTextureDst(CuvidDecoder *decoder, int anz, unsigned int size_x, unsig
.export_handle = PL_HANDLE_FD, .export_handle = PL_HANDLE_FD,
#endif #endif
}); });
} //}
// make planes for image // make planes for image
pl = &decoder->pl_frames[i].planes[n]; pl = &decoder->pl_frames[i].planes[n];