mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-28 19:20:35 +00:00
plugins: update buffer pool size with new allocator's image size
Depends on media, video size is sometimes updated with new allocator. It leads to dismatch between bufferpool's set size and real allocated buffer size. In this case, it causes every buffer is freed during release in bufferpool, which should be reused. This affects performance. https://bugzilla.gnome.org/show_bug.cgi?id=769248
This commit is contained in:
parent
ad3ae71032
commit
d0ee0b4e72
1 changed files with 4 additions and 0 deletions
|
@ -832,6 +832,10 @@ gst_vaapi_plugin_base_decide_allocation (GstVaapiPluginBase * plugin,
|
|||
if (!pool) {
|
||||
if (!ensure_srcpad_allocator (plugin, &vi))
|
||||
goto error_create_allocator;
|
||||
|
||||
/* Update video size with allocator's image size */
|
||||
size = GST_VIDEO_INFO_SIZE (&GST_VAAPI_VIDEO_ALLOCATOR_CAST
|
||||
(plugin->srcpad_allocator)->image_info);
|
||||
pool = gst_vaapi_plugin_base_create_pool (plugin, caps, size, min, max,
|
||||
pool_options, plugin->srcpad_allocator);
|
||||
if (!pool)
|
||||
|
|
Loading…
Reference in a new issue