From 56932f47e468ef6b5ea84821388234181740540d Mon Sep 17 00:00:00 2001 From: jojo61 Date: Sun, 18 Nov 2018 15:25:43 +0100 Subject: [PATCH] Cleanup --- openglosd.cpp | 4 ---- video.c | 10 +++++++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/openglosd.cpp b/openglosd.cpp index 9f7c755..63e58f4 100644 --- a/openglosd.cpp +++ b/openglosd.cpp @@ -788,10 +788,6 @@ bool cOglCmdCopyBufferToOutputFb::Execute(void) { glClear(GL_COLOR_BUFFER_BIT); #ifdef PLACEBO -// if (posd) -// free(posd); -// posd = MALLOC(unsigned char, (y+fb->Height()) * (x+fb->Width()) * 4); - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); glPixelStorei(GL_PACK_ALIGNMENT, 1); if (posd) diff --git a/video.c b/video.c index a1fd17e..885961d 100644 --- a/video.c +++ b/video.c @@ -132,7 +132,7 @@ typedef enum #ifdef USE_GLX #include #include // For GL_COLOR_BUFFER_BIT -#include // For GL_COLOR_BUFFER_BIT +//#include // For GL_COLOR_BUFFER_BIT //#include #include // only for gluErrorString @@ -144,7 +144,7 @@ typedef enum #ifdef CUVID //#define CUDA_API_PER_THREAD_DEFAULT_STREAM #include // For GL_COLOR_BUFFER_BIT -#include // For GL_COLOR_BUFFER_BIT +//#include // For GL_COLOR_BUFFER_BIT #include #include //#include @@ -3568,7 +3568,7 @@ static void CuvidDisplayFrame(void) struct pl_swapchain_frame frame; struct pl_render_target target; bool ok; - static int test; + const float black[4] = { 0.0f,0.0f,0.0f,1.0f}; #endif @@ -3599,6 +3599,8 @@ static void CuvidDisplayFrame(void) pl_render_target_from_swapchain(&target, &frame); // make target frame + pl_tex_clear(p->gpu,target.fbo,black); // clear frame + target.repr.sys = PL_COLOR_SYSTEM_RGB; target.repr.levels = PL_COLOR_LEVELS_PC; target.repr.alpha = PL_ALPHA_UNKNOWN; @@ -4434,6 +4436,7 @@ void VideoOsdClear(void) #ifdef PLACEBO OsdShown = 0; + #else VideoThreadLock(); VideoUsedModule->OsdClear(); @@ -4492,6 +4495,7 @@ void VideoOsdDrawARGB(int xi, int yi, int width, int height, int pitch, #ifdef USE_OPENGLOSD void ActivateOsd(GLuint texture, int x, int y, int xsize, int ysize) { +//printf("OSD open %d %d %d %d\n",x,y,xsize,ysize); OsdShown = 1; OSDfb = texture; OSDtexture = texture;