videofilter: add caps to pool config

Does not cause problems but it fixes a warning in the log.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=696916
This commit is contained in:
Matej Knopp 2013-03-30 17:39:39 +01:00 committed by Wim Taymans
parent e58f838ca3
commit c78cbd0d95

View file

@ -126,13 +126,13 @@ gst_video_filter_decide_allocation (GstBaseTransform * trans, GstQuery * query)
GstStructure *config; GstStructure *config;
guint min, max, size; guint min, max, size;
gboolean update_pool; gboolean update_pool;
GstCaps *outcaps = NULL;
if (gst_query_get_n_allocation_pools (query) > 0) { if (gst_query_get_n_allocation_pools (query) > 0) {
gst_query_parse_nth_allocation_pool (query, 0, &pool, &size, &min, &max); gst_query_parse_nth_allocation_pool (query, 0, &pool, &size, &min, &max);
update_pool = TRUE; update_pool = TRUE;
} else { } else {
GstCaps *outcaps;
GstVideoInfo vinfo; GstVideoInfo vinfo;
gst_query_parse_allocation (query, &outcaps, NULL); gst_query_parse_allocation (query, &outcaps, NULL);
@ -148,6 +148,8 @@ gst_video_filter_decide_allocation (GstBaseTransform * trans, GstQuery * query)
config = gst_buffer_pool_get_config (pool); config = gst_buffer_pool_get_config (pool);
gst_buffer_pool_config_add_option (config, GST_BUFFER_POOL_OPTION_VIDEO_META); gst_buffer_pool_config_add_option (config, GST_BUFFER_POOL_OPTION_VIDEO_META);
if (outcaps)
gst_buffer_pool_config_set_params (config, outcaps, size, 0, 0);
gst_buffer_pool_set_config (pool, config); gst_buffer_pool_set_config (pool, config);
if (update_pool) if (update_pool)