From 4649ac1c382abb8960f40832871548eae2f80de8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= Date: Mon, 21 May 2018 11:56:11 +0200 Subject: [PATCH] libs: decoder: remove gst_vaapi_decoder_unref() Replaced by gst_object_unref() in tests https://bugzilla.gnome.org/show_bug.cgi?id=796308 --- gst-libs/gst/vaapi/gstvaapidecoder.c | 13 ------------- gst-libs/gst/vaapi/gstvaapidecoder.h | 5 +---- tests/test-decode.c | 2 +- tests/test-subpicture.c | 2 +- 4 files changed, 3 insertions(+), 19 deletions(-) diff --git a/gst-libs/gst/vaapi/gstvaapidecoder.c b/gst-libs/gst/vaapi/gstvaapidecoder.c index 12124b8974..8bc67808f8 100644 --- a/gst-libs/gst/vaapi/gstvaapidecoder.c +++ b/gst-libs/gst/vaapi/gstvaapidecoder.c @@ -586,19 +586,6 @@ gst_vaapi_decoder_init (GstVaapiDecoder * decoder) gst_video_codec_frame_unref); } -/** - * gst_vaapi_decoder_unref: - * @decoder: a #GstVaapiDecoder - * - * Atomically decreases the reference count of the @decoder by one. If - * the reference count reaches zero, the decoder will be free'd. - */ -void -gst_vaapi_decoder_unref (GstVaapiDecoder * decoder) -{ - gst_object_unref (decoder); -} - /** * gst_vaapi_decoder_replace: * @old_decoder_ptr: a pointer to a #GstVaapiDecoder diff --git a/gst-libs/gst/vaapi/gstvaapidecoder.h b/gst-libs/gst/vaapi/gstvaapidecoder.h index acb26493ed..fb4b196d83 100644 --- a/gst-libs/gst/vaapi/gstvaapidecoder.h +++ b/gst-libs/gst/vaapi/gstvaapidecoder.h @@ -80,9 +80,6 @@ typedef enum { GType gst_vaapi_decoder_get_type (void) G_GNUC_CONST; -void -gst_vaapi_decoder_unref (GstVaapiDecoder * decoder); - void gst_vaapi_decoder_replace (GstVaapiDecoder ** old_decoder_ptr, GstVaapiDecoder * new_decoder); @@ -146,7 +143,7 @@ gboolean gst_vaapi_decoder_update_caps (GstVaapiDecoder * decoder, GstCaps * caps); #ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC -G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstVaapiDecoder, gst_vaapi_decoder_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstVaapiDecoder, gst_object_unref) #endif G_END_DECLS diff --git a/tests/test-decode.c b/tests/test-decode.c index a85eabad34..cc1688bc1c 100644 --- a/tests/test-decode.c +++ b/tests/test-decode.c @@ -134,7 +134,7 @@ main (int argc, char *argv[]) if (pixmap) gst_vaapi_pixmap_unref (pixmap); gst_vaapi_surface_proxy_unref (proxy); - gst_vaapi_decoder_unref (decoder); + gst_object_unref (decoder); gst_vaapi_window_unref (window); gst_object_unref (display); gst_object_unref (display2); diff --git a/tests/test-subpicture.c b/tests/test-subpicture.c index 588e7a7b59..c3298abe71 100644 --- a/tests/test-subpicture.c +++ b/tests/test-subpicture.c @@ -164,7 +164,7 @@ main (int argc, char *argv[]) gst_video_overlay_composition_unref (compo); gst_vaapi_surface_proxy_unref (proxy); - gst_vaapi_decoder_unref (decoder); + gst_object_unref (decoder); gst_vaapi_window_unref (window); gst_object_unref (display); g_free (g_codec_str);