From c43bae0a42f2e2f02b45bf1a1e97e162f5ae1916 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 7 May 2018 17:53:32 +0300 Subject: [PATCH] videoaggregator: Set video-meta option on buffer pool configuration correctly CID 1435451 --- gst-libs/gst/video/gstvideoaggregator.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/gst-libs/gst/video/gstvideoaggregator.c b/gst-libs/gst/video/gstvideoaggregator.c index 240602fb61..8474f2de6c 100644 --- a/gst-libs/gst/video/gstvideoaggregator.c +++ b/gst-libs/gst/video/gstvideoaggregator.c @@ -2292,6 +2292,10 @@ gst_video_aggregator_decide_allocation (GstAggregator * agg, GstQuery * query) gst_buffer_pool_config_set_params (config, caps, size, min, max); gst_buffer_pool_config_set_allocator (config, allocator, ¶ms); + if (gst_query_find_allocation_meta (query, GST_VIDEO_META_API_TYPE, NULL)) { + gst_buffer_pool_config_add_option (config, + GST_BUFFER_POOL_OPTION_VIDEO_META); + } /* buffer pool may have to do some changes */ if (!gst_buffer_pool_set_config (pool, config)) { @@ -2305,17 +2309,17 @@ gst_video_aggregator_decide_allocation (GstAggregator * agg, GstQuery * query) pool = gst_video_buffer_pool_new (); gst_buffer_pool_config_set_params (config, caps, size, min, max); gst_buffer_pool_config_set_allocator (config, allocator, ¶ms); + + if (gst_query_find_allocation_meta (query, GST_VIDEO_META_API_TYPE, NULL)) { + gst_buffer_pool_config_add_option (config, + GST_BUFFER_POOL_OPTION_VIDEO_META); + } } if (!gst_buffer_pool_set_config (pool, config)) goto config_failed; } - if (gst_query_find_allocation_meta (query, GST_VIDEO_META_API_TYPE, NULL)) { - gst_buffer_pool_config_add_option (config, - GST_BUFFER_POOL_OPTION_VIDEO_META); - } - if (update) gst_query_set_nth_allocation_pool (query, 0, pool, size, min, max); else