From 9d8bac313febefdd6006135d54df43664b7d5076 Mon Sep 17 00:00:00 2001 From: Gwenole Beauchesne Date: Thu, 18 Apr 2013 10:06:15 +0200 Subject: [PATCH] plugins: use gst_object_unref() wherever applicable. Use gst_object_unref() wherever applicable, e.g. objects derived from GstElement, GstVideoPool, etc. --- gst/vaapi/gstvaapidecode.c | 4 ++-- gst/vaapi/gstvaapidownload.c | 2 +- gst/vaapi/gstvaapisink.c | 2 +- gst/vaapi/gstvaapiupload.c | 8 ++++---- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/gst/vaapi/gstvaapidecode.c b/gst/vaapi/gstvaapidecode.c index cd773f7502..ccb54924dd 100644 --- a/gst/vaapi/gstvaapidecode.c +++ b/gst/vaapi/gstvaapidecode.c @@ -453,7 +453,7 @@ gst_vaapidecode_decide_allocation(GstVideoDecoder *vdec, GstQuery *query) else gst_query_add_allocation_pool(query, pool, size, min, max); if (pool) - g_object_unref(pool); + gst_object_unref(pool); return TRUE; /* ERRORS */ @@ -816,7 +816,7 @@ gst_vaapidecode_query(GST_PAD_QUERY_FUNCTION_ARGS) res = GST_PAD_QUERY_FUNCTION_CALL(decode->srcpad_query, decode->srcpad, parent, query); - g_object_unref(decode); + gst_object_unref(decode); return res; } diff --git a/gst/vaapi/gstvaapidownload.c b/gst/vaapi/gstvaapidownload.c index a122258599..1a5f090f19 100644 --- a/gst/vaapi/gstvaapidownload.c +++ b/gst/vaapi/gstvaapidownload.c @@ -592,7 +592,7 @@ gst_vaapidownload_query(GstPad *pad, GstQuery *query) else res = gst_pad_query_default(pad, query); - g_object_unref(download); + gst_object_unref(download); return res; } diff --git a/gst/vaapi/gstvaapisink.c b/gst/vaapi/gstvaapisink.c index 35313dd2ff..4c8d46d912 100644 --- a/gst/vaapi/gstvaapisink.c +++ b/gst/vaapi/gstvaapisink.c @@ -654,7 +654,7 @@ error_create_pool: error_pool_config: { GST_ERROR("failed to reset buffer pool config"); - g_object_unref(pool); + gst_object_unref(pool); return FALSE; } #else diff --git a/gst/vaapi/gstvaapiupload.c b/gst/vaapi/gstvaapiupload.c index 50c8c9ff6b..aa22057fa9 100644 --- a/gst/vaapi/gstvaapiupload.c +++ b/gst/vaapi/gstvaapiupload.c @@ -233,12 +233,12 @@ gst_vaapiupload_init(GstVaapiUpload *upload) gst_vaapiupload_sinkpad_buffer_alloc ); gst_pad_set_query_function(sinkpad, gst_vaapiupload_query); - g_object_unref(sinkpad); + gst_object_unref(sinkpad); /* Override query on src pad */ srcpad = gst_element_get_static_pad(GST_ELEMENT(upload), "src"); gst_pad_set_query_function(srcpad, gst_vaapiupload_query); - g_object_unref(srcpad); + gst_object_unref(srcpad); } static inline gboolean @@ -425,7 +425,7 @@ gst_vaapiupload_sinkpad_buffer_alloc( return GST_FLOW_UNEXPECTED; ret = gst_vaapiupload_buffer_alloc(trans, size, caps, pbuf); - g_object_unref(trans); + gst_object_unref(trans); return ret; } @@ -471,6 +471,6 @@ gst_vaapiupload_query(GstPad *pad, GstQuery *query) else res = gst_pad_query_default (pad, query); - g_object_unref (upload); + gst_object_unref (upload); return res; }