From 5b5ebc0a15099582d32e09ff8929338c048d9ab9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= Date: Wed, 17 Feb 2016 12:51:45 +0100 Subject: [PATCH] plugins: remove deprecated code Since we are only supporting current GStreamer version, since 1.3 gst_buffer_pool_config_add_option() checks if the option to add is already set. There is no need to do it ourselves. --- gst/vaapi/gstvaapipluginbase.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/gst/vaapi/gstvaapipluginbase.c b/gst/vaapi/gstvaapipluginbase.c index cb477ca33e..622853d352 100644 --- a/gst/vaapi/gstvaapipluginbase.c +++ b/gst/vaapi/gstvaapipluginbase.c @@ -570,8 +570,6 @@ error_pool_config: } } -/* XXXX: GStreamer 1.2 doesn't check, in gst_buffer_pool_set_config() - if the config option is already set */ static inline gboolean gst_vaapi_plugin_base_set_pool_config (GstBufferPool * pool, const gchar * option) @@ -579,13 +577,8 @@ gst_vaapi_plugin_base_set_pool_config (GstBufferPool * pool, GstStructure *config; config = gst_buffer_pool_get_config (pool); - if (!gst_buffer_pool_config_has_option (config, option)) { - gst_buffer_pool_config_add_option (config, option); - return gst_buffer_pool_set_config (pool, config); - } else { - gst_structure_free (config); - } - return TRUE; + gst_buffer_pool_config_add_option (config, option); + return gst_buffer_pool_set_config (pool, config); } /**