From 9219f06c5a67728fe638f283ced36684a9e13701 Mon Sep 17 00:00:00 2001 From: jojo61 Date: Fri, 21 Apr 2023 12:22:44 +0200 Subject: [PATCH] Remove vaapi Lock for DRM --- softhdcuvid.cpp | 2 +- video.c | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/softhdcuvid.cpp b/softhdcuvid.cpp index d3d63fb..ef1843d 100644 --- a/softhdcuvid.cpp +++ b/softhdcuvid.cpp @@ -61,7 +61,7 @@ extern void ToggleLUT(); /// vdr-plugin version number. /// Makefile extracts the version number for generating the file name /// for the distribution archive. -static const char *const VERSION = "3.8" +static const char *const VERSION = "3.9" #ifdef GIT_REV "-GIT" GIT_REV #endif diff --git a/video.c b/video.c index f2a232a..e58667b 100644 --- a/video.c +++ b/video.c @@ -2375,7 +2375,11 @@ void generateVAAPIImage(CuvidDecoder *decoder, int index, const AVFrame *frame, return; } // vaSyncSurface(decoder->VaDisplay, (unsigned int)frame->data[3]); +#ifdef USE_DRM + SharedContext; +#else Lock_and_SharedContext; +#endif for (n = 0; n < 2; n++) { // Set DMA_BUF from VAAPI decoder to Textures int id = desc.layers[n].object_index[0]; int fd = desc.objects[id].fd; @@ -2448,7 +2452,11 @@ void generateVAAPIImage(CuvidDecoder *decoder, int index, const AVFrame *frame, decoder->pl_frames[index].planes[n].texture = pl_tex_create(p->gpu, &tex_params); } +#ifdef USE_DRM + NoContext; +#else Unlock_and_NoContext; +#endif } #endif