Commit 8f04da59 authored by Jean-Paul Saman's avatar Jean-Paul Saman

src/xvba_video_glx.c: properly cleanup on shutdown of render_thread()

The render thread allocates a new render_context, but never destroys it
when shutting down. It possibly leaks on closing.
parent 141c7a3e
...@@ -188,6 +188,8 @@ static void *render_thread(void *arg) ...@@ -188,6 +188,8 @@ static void *render_thread(void *arg)
Display * const x11_dpy = driver_data->x11_dpy_local; Display * const x11_dpy = driver_data->x11_dpy_local;
#endif #endif
ASSERT(obj_output->render_context);
GLContextState old_cs; GLContextState old_cs;
obj_output->render_context = gl_create_context( obj_output->render_context = gl_create_context(
x11_dpy, x11_dpy,
...@@ -248,6 +250,9 @@ static void *render_thread(void *arg) ...@@ -248,6 +250,9 @@ static void *render_thread(void *arg)
break; break;
} }
} }
destroy_glx_surface(obj_output->render_context, obj_glx_surface);
gl_destroy_context(obj_output->render_context);
gl_set_current_context(&old_cs, NULL); gl_set_current_context(&old_cs, NULL);
return NULL; return NULL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment