mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-05-02 14:34:51 +00:00
plugins: avoid to get/set pool config twice
This patch is a bit of optimization, since the bufferpool configuration is get when the pool is created. Hence, we only need to request it when the pool from the allocation query is reused.
This commit is contained in:
parent
9667f0e472
commit
c9f6006865
1 changed files with 3 additions and 3 deletions
|
@ -734,6 +734,7 @@ gst_vaapi_plugin_base_decide_allocation (GstVaapiPluginBase * plugin,
|
|||
min = max = 0;
|
||||
}
|
||||
|
||||
config = NULL;
|
||||
if (!pool) {
|
||||
pool = gst_vaapi_video_buffer_pool_new (plugin->display);
|
||||
if (!pool)
|
||||
|
@ -743,11 +744,10 @@ gst_vaapi_plugin_base_decide_allocation (GstVaapiPluginBase * plugin,
|
|||
gst_buffer_pool_config_set_params (config, caps, size, min, max);
|
||||
gst_buffer_pool_config_add_option (config,
|
||||
GST_BUFFER_POOL_OPTION_VAAPI_VIDEO_META);
|
||||
if (!gst_buffer_pool_set_config (pool, config))
|
||||
goto error_config_failed;
|
||||
}
|
||||
|
||||
config = gst_buffer_pool_get_config (pool);
|
||||
if (!config)
|
||||
config = gst_buffer_pool_get_config (pool);
|
||||
|
||||
/* Check whether GstVideoMeta, or GstVideoAlignment, is needed (raw video) */
|
||||
if (has_video_meta) {
|
||||
|
|
Loading…
Reference in a new issue