summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2020-12-12 10:30:41 +0100
committerVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2020-12-12 10:38:17 +0100
commita16849b4ed03557b2f03cc1458cd297ef6aeda71 (patch)
tree72bfcd9e31927c5cb74359334b2a67d355db3c7d
parent5bee089331cfe6e579f75f482b2501737cfbecdc (diff)
vaapi: use gst_clear_object instead of g_clear_object
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/406>
-rw-r--r--gst/vaapi/gstvaapidecodebin.c6
-rw-r--r--gst/vaapi/gstvaapipluginbase.c18
-rw-r--r--gst/vaapi/gstvaapivideobufferpool.c2
3 files changed, 13 insertions, 13 deletions
diff --git a/gst/vaapi/gstvaapidecodebin.c b/gst/vaapi/gstvaapidecodebin.c
index 7edf3972..73585069 100644
--- a/gst/vaapi/gstvaapidecodebin.c
+++ b/gst/vaapi/gstvaapidecodebin.c
@@ -411,7 +411,7 @@ gst_vaapi_decode_bin_init (GstVaapiDecodeBin * vaapidecbin)
/* create the queue */
vaapidecbin->queue = gst_element_factory_make ("queue", "vaapi-queue");
if (!vaapidecbin->queue) {
- g_clear_object (&vaapidecbin->decoder);
+ gst_clear_object (&vaapidecbin->decoder);
post_missing_element_message (vaapidecbin, "queue");
return;
}
@@ -420,8 +420,8 @@ gst_vaapi_decode_bin_init (GstVaapiDecodeBin * vaapidecbin)
vaapidecbin->queue, NULL);
if (!gst_element_link (vaapidecbin->decoder, vaapidecbin->queue)) {
- g_clear_object (&vaapidecbin->decoder);
- g_clear_object (&vaapidecbin->queue);
+ gst_clear_object (&vaapidecbin->decoder);
+ gst_clear_object (&vaapidecbin->queue);
g_critical ("failed to link decoder and queue");
return;
}
diff --git a/gst/vaapi/gstvaapipluginbase.c b/gst/vaapi/gstvaapipluginbase.c
index 72b28b86..3a8664ba 100644
--- a/gst/vaapi/gstvaapipluginbase.c
+++ b/gst/vaapi/gstvaapipluginbase.c
@@ -61,13 +61,13 @@ gst_vaapi_pad_private_reset (GstVaapiPadPrivate * priv)
gst_caps_replace (&priv->caps, NULL);
gst_video_info_init (&priv->info);
- g_clear_object (&priv->buffer_pool);
- g_clear_object (&priv->allocator);
+ gst_clear_object (&priv->buffer_pool);
+ gst_clear_object (&priv->allocator);
priv->buffer_size = 0;
priv->caps_is_raw = FALSE;
- g_clear_object (&priv->other_allocator);
+ gst_clear_object (&priv->other_allocator);
}
void
@@ -765,8 +765,8 @@ ensure_sinkpad_buffer_pool (GstVaapiPluginBase * plugin, GstPad * sinkpad)
if (gst_vaapi_buffer_pool_caps_is_equal (sinkpriv->buffer_pool, caps))
return TRUE;
gst_buffer_pool_set_active (sinkpriv->buffer_pool, FALSE);
- g_clear_object (&sinkpriv->buffer_pool);
- g_clear_object (&sinkpriv->allocator);
+ gst_clear_object (&sinkpriv->buffer_pool);
+ gst_clear_object (&sinkpriv->allocator);
sinkpriv->buffer_size = 0;
}
@@ -802,8 +802,8 @@ _set_srcpad_caps (GstVaapiPluginBase * plugin, GstPad * srcpad, GstCaps * caps)
&& !gst_vaapi_buffer_pool_caps_is_equal (srcpriv->buffer_pool,
caps)) {
gst_buffer_pool_set_active (srcpriv->buffer_pool, FALSE);
- g_clear_object (&srcpriv->buffer_pool);
- g_clear_object (&srcpriv->allocator);
+ gst_clear_object (&srcpriv->buffer_pool);
+ gst_clear_object (&srcpriv->allocator);
plugin_reset_texture_map (plugin);
}
gst_caps_replace (&srcpriv->caps, caps);
@@ -1085,7 +1085,7 @@ gst_vaapi_plugin_base_decide_allocation (GstVaapiPluginBase * plugin,
GST_BUFFER_POOL_OPTION_VAAPI_VIDEO_META)) {
GST_INFO_OBJECT (plugin, "ignoring non-VAAPI pool: %" GST_PTR_FORMAT,
pool);
- g_clear_object (&pool);
+ gst_clear_object (&pool);
}
}
} else {
@@ -1122,7 +1122,7 @@ gst_vaapi_plugin_base_decide_allocation (GstVaapiPluginBase * plugin,
}
}
- g_clear_object (&srcpriv->buffer_pool);
+ gst_clear_object (&srcpriv->buffer_pool);
srcpriv->buffer_pool = pool;
/* if downstream doesn't support GstVideoMeta, and the negotiated
diff --git a/gst/vaapi/gstvaapivideobufferpool.c b/gst/vaapi/gstvaapivideobufferpool.c
index 3ff29acd..d6c3ccd9 100644
--- a/gst/vaapi/gstvaapivideobufferpool.c
+++ b/gst/vaapi/gstvaapivideobufferpool.c
@@ -61,7 +61,7 @@ gst_vaapi_video_buffer_pool_finalize (GObject * object)
GST_VAAPI_VIDEO_BUFFER_POOL (object)->priv;
gst_vaapi_display_replace (&priv->display, NULL);
- g_clear_object (&priv->allocator);
+ gst_clear_object (&priv->allocator);
if (priv->dma_mem_map)
g_hash_table_destroy (priv->dma_mem_map);