diff options
author | Nicolas Dufresne <nicolas.dufresne@collabora.com> | 2017-09-05 16:20:44 -0400 |
---|---|---|
committer | Nicolas Dufresne <nicolas.dufresne@collabora.com> | 2017-09-06 14:19:37 -0400 |
commit | 9b2e28d91d00638e76a39ec219e99aa33241b242 (patch) | |
tree | 8367f695f6a57dcde201260c58ee9159b5c04f30 /gst-libs/gst/gl | |
parent | e796a7cb974a361bd4463a71aed4e1256cfe2df6 (diff) |
Request minimum buffer even if need_pool is FALSE
When tee is used, it will not request a pool, but still it wants to
know how many buffers are required.
https://bugzilla.gnome.org/show_bug.cgi?id=730758
Diffstat (limited to 'gst-libs/gst/gl')
-rw-r--r-- | gst-libs/gst/gl/gstglfilter.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/gst-libs/gst/gl/gstglfilter.c b/gst-libs/gst/gl/gstglfilter.c index 9f03b5044..15f7b614e 100644 --- a/gst-libs/gst/gl/gstglfilter.c +++ b/gst-libs/gst/gl/gstglfilter.c @@ -774,7 +774,9 @@ gst_gl_filter_propose_allocation (GstBaseTransform * trans, GstGLFilter *filter = GST_GL_FILTER (trans); GstGLContext *context = GST_GL_BASE_FILTER (filter)->context; GstCaps *caps; + GstVideoInfo info; guint size; + GstBufferPool *pool = NULL; gboolean need_pool; gst_query_parse_allocation (query, &caps, &need_pool); @@ -782,16 +784,14 @@ gst_gl_filter_propose_allocation (GstBaseTransform * trans, if (caps == NULL) goto no_caps; - if (need_pool) { - GstBufferPool *pool; - GstStructure *config; - GstVideoInfo info; + if (!gst_video_info_from_caps (&info, caps)) + goto invalid_caps; - if (!gst_video_info_from_caps (&info, caps)) - goto invalid_caps; + /* the normal size of a frame */ + size = info.size; - /* the normal size of a frame */ - size = info.size; + if (need_pool) { + GstStructure *config; GST_DEBUG_OBJECT (filter, "create new pool"); pool = gst_gl_buffer_pool_new (context); @@ -803,10 +803,11 @@ gst_gl_filter_propose_allocation (GstBaseTransform * trans, g_object_unref (pool); goto config_failed; } + } - gst_query_add_allocation_pool (query, pool, size, 1, 0); + gst_query_add_allocation_pool (query, pool, size, 1, 0); + if (pool) g_object_unref (pool); - } if (context->gl_vtable->FenceSync) gst_query_add_allocation_meta (query, GST_GL_SYNC_META_API_TYPE, 0); |