From c176499925a111162de21836ac97b180d79591ad Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 13 Oct 2012 12:21:05 +0200 Subject: vo_opengl: fix filter reinitialization The second scaling filter (cscale) was never reset correctly due to a fatal oversight. In particular, this could lead to OpenGL errors, if the new filter needs a 2D texture, but the old texture was 1D (because init_scaler reuses the texture). --- libvo/vo_opengl.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libvo/vo_opengl.c b/libvo/vo_opengl.c index f5c04c03d8..d720b0088c 100644 --- a/libvo/vo_opengl.c +++ b/libvo/vo_opengl.c @@ -948,10 +948,10 @@ static void uninit_rendering(struct gl_priv *p) delete_shaders(p); for (int n = 0; n < 2; n++) { - gl->DeleteTextures(1, &p->scalers->gl_lut); - p->scalers->gl_lut = 0; - p->scalers->lut_name = NULL; - p->scalers->kernel = NULL; + gl->DeleteTextures(1, &p->scalers[n].gl_lut); + p->scalers[n].gl_lut = 0; + p->scalers[n].lut_name = NULL; + p->scalers[n].kernel = NULL; } gl->DeleteTextures(1, &p->dither_texture); -- cgit v1.2.3