Commit 5287a61d authored by Jean-Paul Saman's avatar Jean-Paul Saman

src/xvba_video_glx.c: Do not leak textures from obj_glx_surface.

parent 752043de
...@@ -307,7 +307,8 @@ static void destroy_hw_image_glx( ...@@ -307,7 +307,8 @@ static void destroy_hw_image_glx(
for (i = 0; i < hwi->num_textures; i++) { for (i = 0; i < hwi->num_textures; i++) {
assert(hwi->textures[i]); assert(hwi->textures[i]);
gl_destroy_texture(&hwi->textures[i], hwi->target); if (hwi->textures[i])
gl_destroy_texture(&hwi->textures[i], hwi->target);
hwi->formats[i] = GL_NONE; hwi->formats[i] = GL_NONE;
hwi->textures[i] = 0; hwi->textures[i] = 0;
} }
...@@ -632,6 +633,11 @@ destroy_glx_surface( ...@@ -632,6 +633,11 @@ destroy_glx_surface(
if (!obj_glx_surface) if (!obj_glx_surface)
return; return;
if (obj_glx_surface->texture) {
gl_destroy_texture(&obj_glx_surface->texture, obj_glx_surface->target);
obj_glx_surface->texture = 0;
}
if (obj_glx_surface->fbo) { if (obj_glx_surface->fbo) {
gl_destroy_framebuffer_object(obj_glx_surface->fbo); gl_destroy_framebuffer_object(obj_glx_surface->fbo);
obj_glx_surface->fbo = NULL; obj_glx_surface->fbo = NULL;
...@@ -1459,7 +1465,7 @@ ensure_scaler( ...@@ -1459,7 +1465,7 @@ ensure_scaler(
} }
if (obj_glx_surface->hqscaler_texture) { if (obj_glx_surface->hqscaler_texture) {
glDeleteTextures(1, &obj_glx_surface->hqscaler_texture); gl_destroy_texture(&obj_glx_surface->hqscaler_texture, GL_TEXTURE_1D);
obj_glx_surface->hqscaler_texture = 0; obj_glx_surface->hqscaler_texture = 0;
} }
......
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