plugins: use gst_object_unref() wherever applicable.

Use gst_object_unref() wherever applicable, e.g. objects derived from
GstElement, GstVideoPool, etc.
This commit is contained in:
Gwenole Beauchesne 2013-04-18 10:06:15 +02:00
parent 0db4133347
commit 9d8bac313f
4 changed files with 8 additions and 8 deletions

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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

View file

@ -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;
}