mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 09:10:36 +00:00
gltestsrc: do not leak pool in error cases
https://bugzilla.gnome.org/show_bug.cgi?id=736730
This commit is contained in:
parent
276b682559
commit
3a70f04113
1 changed files with 16 additions and 16 deletions
|
@ -608,22 +608,6 @@ gst_gl_test_src_decide_allocation (GstBaseSrc * basesrc, GstQuery * query)
|
||||||
guint out_width, out_height;
|
guint out_width, out_height;
|
||||||
GstGLContext *other_context = NULL;
|
GstGLContext *other_context = NULL;
|
||||||
|
|
||||||
gst_query_parse_allocation (query, &caps, NULL);
|
|
||||||
|
|
||||||
if (gst_query_get_n_allocation_pools (query) > 0) {
|
|
||||||
gst_query_parse_nth_allocation_pool (query, 0, &pool, &size, &min, &max);
|
|
||||||
|
|
||||||
update_pool = TRUE;
|
|
||||||
} else {
|
|
||||||
GstVideoInfo vinfo;
|
|
||||||
|
|
||||||
gst_video_info_init (&vinfo);
|
|
||||||
gst_video_info_from_caps (&vinfo, caps);
|
|
||||||
size = vinfo.size;
|
|
||||||
min = max = 0;
|
|
||||||
update_pool = FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!gst_gl_ensure_display (src, &src->display))
|
if (!gst_gl_ensure_display (src, &src->display))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
@ -678,6 +662,22 @@ gst_gl_test_src_decide_allocation (GstBaseSrc * basesrc, GstQuery * query)
|
||||||
&src->fbo, &src->depthbuffer))
|
&src->fbo, &src->depthbuffer))
|
||||||
goto context_error;
|
goto context_error;
|
||||||
|
|
||||||
|
gst_query_parse_allocation (query, &caps, NULL);
|
||||||
|
|
||||||
|
if (gst_query_get_n_allocation_pools (query) > 0) {
|
||||||
|
gst_query_parse_nth_allocation_pool (query, 0, &pool, &size, &min, &max);
|
||||||
|
|
||||||
|
update_pool = TRUE;
|
||||||
|
} else {
|
||||||
|
GstVideoInfo vinfo;
|
||||||
|
|
||||||
|
gst_video_info_init (&vinfo);
|
||||||
|
gst_video_info_from_caps (&vinfo, caps);
|
||||||
|
size = vinfo.size;
|
||||||
|
min = max = 0;
|
||||||
|
update_pool = FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
if (!pool)
|
if (!pool)
|
||||||
pool = gst_gl_buffer_pool_new (src->context);
|
pool = gst_gl_buffer_pool_new (src->context);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue