From 6f892bb8d17b9778b27f62ce94373a9f6f2e2fbe Mon Sep 17 00:00:00 2001 From: jojo61 Date: Fri, 5 Oct 2018 14:21:50 +0200 Subject: [PATCH] more PIP fixes --- video.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/video.c b/video.c index 74a2aae..82779f8 100644 --- a/video.c +++ b/video.c @@ -1981,14 +1981,17 @@ static void CuvidDelHwDecoder(CuvidDecoder * decoder) { int i,n; Debug(3,"cuvid del hw decoder cuda_ctx %p\n",decoder->cuda_ctx); -// pthread_mutex_lock(&VideoLockMutex); + if (decoder == CuvidDecoders[0]) + pthread_mutex_lock(&VideoLockMutex); glXMakeCurrent(XlibDisplay, VideoWindow, GlxSharedContext); GlxCheck(); if (decoder->SurfaceFreeN || decoder->SurfaceUsedN) { CuvidDestroySurfaces(decoder); } -// pthread_mutex_unlock(&VideoLockMutex); + if (decoder == CuvidDecoders[0]) + pthread_mutex_unlock(&VideoLockMutex); + #if 0 if (decoder->cuda_ctx) { cuCtxDestroy (decoder->cuda_ctx);