From 780c594ba2788814ad7b85f8fa855b57f71638b3 Mon Sep 17 00:00:00 2001 From: jojo61 Date: Wed, 13 Nov 2019 17:09:49 +0100 Subject: [PATCH] More fixes for OSD --- openglosd.cpp | 18 +++++------------- video.c | 2 +- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/openglosd.cpp b/openglosd.cpp index 06a1675..24a993b 100644 --- a/openglosd.cpp +++ b/openglosd.cpp @@ -895,23 +895,15 @@ bool cOglCmdCopyBufferToOutputFb::Execute(void) { pthread_mutex_lock(&OSDMutex); fb->BindRead(); oFb->BindWrite(); -// glClear(GL_COLOR_BUFFER_BIT); -//#ifdef PLACEBO glPixelStorei(GL_UNPACK_ALIGNMENT, 1); glPixelStorei(GL_PACK_ALIGNMENT, 1); if (posd) glReadPixels(0, 0 ,fb->Width(), fb->Height(),GL_RGBA,GL_UNSIGNED_BYTE,posd); -//#else -#if 0 - fb->Blit(x, y + fb->Height(), x + fb->Width(), y); - glFlush(); -#endif - ActivateOsd(oFb->texture,x, y, fb->Width() ,fb->Height()); - oFb->Unbind(); - glFlush(); + glFlush(); + oFb->Unbind(); pthread_mutex_unlock(&OSDMutex); - + ActivateOsd(oFb->texture,x, y, fb->Width() ,fb->Height()); return true; } @@ -2062,11 +2054,11 @@ cOglOsd::cOglOsd(int Left, int Top, uint Level, std::shared_ptr oglT cOglOsd::~cOglOsd() { OsdClose(); SetActive(false); - +#if 0 if (posd) free(posd); posd = 0; - +#endif oglThread->DoCmd(new cOglCmdDeleteFb(bFb)); } diff --git a/video.c b/video.c index fbfe319..d7ab3bb 100644 --- a/video.c +++ b/video.c @@ -2868,7 +2868,7 @@ int get_RGB(CuvidDecoder * decoder) glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_BORDER); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_BORDER); - pthread_mutex_unlock(&OSDMutex); + pthread_mutex_unlock(&OSDMutex); OsdShown = 2; }