summaryrefslogtreecommitdiff
path: root/gst-libs/gst/vaapi/gstvaapisubpicture.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/gstvaapisubpicture.c
parentc415868f269745c5c87c025681f5ee19feaba278 (diff)
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/gstvaapisubpicture.c')
-rw-r--r--gst-libs/gst/vaapi/gstvaapisubpicture.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/gst-libs/gst/vaapi/gstvaapisubpicture.c b/gst-libs/gst/vaapi/gstvaapisubpicture.c
index 11a94f10..cfd7fd3a 100644
--- a/gst-libs/gst/vaapi/gstvaapisubpicture.c
+++ b/gst-libs/gst/vaapi/gstvaapisubpicture.c
@@ -79,10 +79,7 @@ gst_vaapi_subpicture_destroy(GstVaapiSubpicture *subpicture)
GST_VAAPI_OBJECT_ID(subpicture) = VA_INVALID_ID;
}
- if (priv->image) {
- g_object_unref(priv->image);
- priv->image = NULL;
- }
+ g_clear_object(&priv->image);
}
static gboolean