From: Wang Xin-yu (王昕宇) Date: Wed, 23 Jul 2014 02:25:31 +0000 (+0800) Subject: gl: fix multi gl object leaks X-Git-Tag: 1.16.2~260^2~352 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e9bf900d333e87495a3d6bf2116628c3d1171e23;p=platform%2Fupstream%2Fgst-plugins-base.git gl: fix multi gl object leaks 1. fix FBO leaks in decide_allocation 2. fix texture leaks in decide_allocation and reset 3. fix texture leaks in FBO incomplete error path --- diff --git a/ext/gl/gstglmixer.c b/ext/gl/gstglmixer.c index 626eb96..0d4d7e9 100644 --- a/ext/gl/gstglmixer.c +++ b/ext/gl/gstglmixer.c @@ -641,6 +641,12 @@ gst_gl_mixer_decide_allocation (GstGLMixer * mix, GstQuery * query) out_width = GST_VIDEO_INFO_WIDTH (&vagg->info); out_height = GST_VIDEO_INFO_HEIGHT (&vagg->info); + if (mix->fbo) { + gst_gl_context_del_fbo (mix->context, mix->fbo, mix->depthbuffer); + mix->fbo = 0; + mix->depthbuffer = 0; + } + if (!gst_gl_context_gen_fbo (mix->context, out_width, out_height, &mix->fbo, &mix->depthbuffer)) goto context_error;