summaryrefslogtreecommitdiff
path: root/gst-libs/gst/vaapi/gstvaapicontext.c
diff options
context:
space:
mode:
authorJavier Jardón <jjardon@gnome.org>2012-07-01 05:34:15 +0900
committerGwenole Beauchesne <gwenole.beauchesne@intel.com>2012-07-19 15:19:17 +0200
commit30024b3f8e2de95c0ba31fc4989f45249bd9d070 (patch)
tree0a708011fc123cf9fbd60b126da6a059297677b4 /gst-libs/gst/vaapi/gstvaapicontext.c
parentc415868f269745c5c87c025681f5ee19feaba278 (diff)
downloadgst-vaapi-30024b3f8e2de95c0ba31fc4989f45249bd9d070.tar.gz
libs: use g_clear_object() wherever applicable.
This is a preferred thread-safe version. Also add an inline version of g_clear_object() if compiling with glib < 2.28. Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
Diffstat (limited to 'gst-libs/gst/vaapi/gstvaapicontext.c')
-rw-r--r--gst-libs/gst/vaapi/gstvaapicontext.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/gst-libs/gst/vaapi/gstvaapicontext.c b/gst-libs/gst/vaapi/gstvaapicontext.c
index 9b1bf1ad..52e81e40 100644
--- a/gst-libs/gst/vaapi/gstvaapicontext.c
+++ b/gst-libs/gst/vaapi/gstvaapicontext.c
@@ -158,10 +158,7 @@ gst_vaapi_context_destroy_surfaces(GstVaapiContext *context)
priv->surfaces = NULL;
}
- if (priv->surfaces_pool) {
- g_object_unref(priv->surfaces_pool);
- priv->surfaces_pool = NULL;
- }
+ g_clear_object(&priv->surfaces_pool);
}
static void