mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-21 05:26:23 +00:00
plugins: re-using buffer pool breaks renegotiation
at propose_allocation() we should not reuse the proposed buffer, because it could break renegotiation. https://bugzilla.gnome.org/show_bug.cgi?id=792620
This commit is contained in:
parent
9933dcb218
commit
6efce291f6
1 changed files with 12 additions and 4 deletions
|
@ -806,22 +806,30 @@ gst_vaapi_plugin_base_propose_allocation (GstVaapiPluginBase * plugin,
|
|||
GstCaps *caps = NULL;
|
||||
GstBufferPool *pool = NULL;
|
||||
gboolean need_pool;
|
||||
guint size = 0;
|
||||
|
||||
gst_query_parse_allocation (query, &caps, &need_pool);
|
||||
if (!caps)
|
||||
goto error_no_caps;
|
||||
|
||||
/* FIXME re-using buffer pool breaks renegotiation */
|
||||
if (!ensure_sinkpad_buffer_pool (plugin, caps))
|
||||
if (!ensure_sinkpad_allocator (plugin, caps, &size))
|
||||
return FALSE;
|
||||
|
||||
if (need_pool) {
|
||||
pool = plugin->sinkpad_buffer_pool;
|
||||
pool = gst_vaapi_plugin_base_create_pool (plugin, caps, size,
|
||||
BUFFER_POOL_SINK_MIN_BUFFERS, 0,
|
||||
GST_VAAPI_VIDEO_BUFFER_POOL_OPTION_VIDEO_META,
|
||||
plugin->sinkpad_allocator);
|
||||
if (!pool)
|
||||
return FALSE;
|
||||
|
||||
gst_query_add_allocation_param (query, plugin->sinkpad_allocator, NULL);
|
||||
}
|
||||
|
||||
gst_query_add_allocation_pool (query, pool, plugin->sinkpad_buffer_size,
|
||||
gst_query_add_allocation_pool (query, pool, size,
|
||||
BUFFER_POOL_SINK_MIN_BUFFERS, 0);
|
||||
if (pool)
|
||||
gst_object_unref (pool);
|
||||
|
||||
gst_query_add_allocation_meta (query, GST_VAAPI_VIDEO_META_API_TYPE, NULL);
|
||||
gst_query_add_allocation_meta (query, GST_VIDEO_META_API_TYPE, NULL);
|
||||
|
|
Loading…
Reference in a new issue