glimagesink: free the vertex buffer when done

fixes a memory leak
This commit is contained in:
Matthew Waters 2015-05-14 21:21:01 +10:00 committed by Tim-Philipp Müller
parent 5d8841c8e7
commit 0e2fe3c2e9

View file

@ -1425,8 +1425,13 @@ gst_glimage_sink_cleanup_glthread (GstGLImageSink * gl_sink)
gl_sink->vao = 0; gl_sink->vao = 0;
} }
if (gl_sink->vertex_buffer) {
gl->DeleteBuffers (1, &gl_sink->vertex_buffer);
gl_sink->vertex_buffer = 0;
}
if (gl_sink->vbo_indices) { if (gl_sink->vbo_indices) {
gl->DeleteVertexArrays (1, &gl_sink->vbo_indices); gl->DeleteBuffers (1, &gl_sink->vbo_indices);
gl_sink->vbo_indices = 0; gl_sink->vbo_indices = 0;
} }
} }