diff options
author | Niklas Haas <git@nand.wakku.to> | 2015-03-14 00:32:20 +0100 |
---|---|---|
committer | Niklas Haas <git@nand.wakku.to> | 2015-03-14 00:32:20 +0100 |
commit | e07b6fcdfdee720f42c08fe8c8404fea3272c688 (patch) | |
tree | d05f6ff6032bdf0972232b24438ef1c8746fae61 /video/out | |
parent | 59c18dc73d66142e71393fc411ef1e72e6d96a9e (diff) | |
download | mpv-e07b6fcdfdee720f42c08fe8c8404fea3272c688.tar.bz2 mpv-e07b6fcdfdee720f42c08fe8c8404fea3272c688.tar.xz |
vo_opengl: fix uninitialization logic
The FBOs we use never actually got cleaned up anywhere, and the vimg
planes were hard-coded to only clean up 3.
Diffstat (limited to 'video/out')
-rw-r--r-- | video/out/gl_video.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/video/out/gl_video.c b/video/out/gl_video.c index 54c303b431..ac65c4b0b3 100644 --- a/video/out/gl_video.c +++ b/video/out/gl_video.c @@ -519,6 +519,12 @@ static void uninit_rendering(struct gl_video *p) gl->DeleteTextures(1, &p->dither_texture); p->dither_texture = 0; + fbotex_uninit(&p->indirect_fbo); + fbotex_uninit(&p->chroma_merge_fbo); + + for (int n = 0; n < FBOSURFACES_MAX; n++) + fbotex_uninit(&p->surfaces[n].fbotex); + gl_video_reset_surfaces(p); } @@ -713,7 +719,7 @@ static void uninit_video(struct gl_video *p) struct video_image *vimg = &p->image; - for (int n = 0; n < 3; n++) { + for (int n = 0; n < p->plane_count; n++) { struct texplane *plane = &vimg->planes[n]; gl->DeleteTextures(1, &plane->gl_texture); @@ -843,6 +849,7 @@ static void uninit_scaler(struct gl_video *p, int scaler_unit) GL *gl = p->gl; struct scaler *scaler = &p->scalers[scaler_unit]; + fbotex_uninit(&scaler->sep_fbo); gl->DeleteTextures(1, &scaler->gl_lut); scaler->gl_lut = 0; scaler->kernel = NULL; |