From 2a8784e218df35f1ec1699a59394974349aba67c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 15 May 2017 14:20:32 +0300 Subject: [PATCH] audioclock: Sink the reference in the constructor This is now needed as GstClock does not do that internally anymore, because that broke bindings. And mark the function correctly as (transfer full), which it already was before. https://bugzilla.gnome.org/show_bug.cgi?id=743062 --- gst-libs/gst/audio/gstaudioclock.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gst-libs/gst/audio/gstaudioclock.c b/gst-libs/gst/audio/gstaudioclock.c index a413611a6f..d9373a3eca 100644 --- a/gst-libs/gst/audio/gstaudioclock.c +++ b/gst-libs/gst/audio/gstaudioclock.c @@ -97,7 +97,7 @@ gst_audio_clock_dispose (GObject * object) * calculated it will call @func with @user_data. When @func returns * #GST_CLOCK_TIME_NONE, the clock will return the last reported time. * - * Returns: a new #GstAudioClock casted to a #GstClock. + * Returns: (transfer full): a new #GstAudioClock casted to a #GstClock. */ GstClock * gst_audio_clock_new (const gchar * name, GstAudioClockGetTimeFunc func, @@ -111,6 +111,8 @@ gst_audio_clock_new (const gchar * name, GstAudioClockGetTimeFunc func, aclock->user_data = user_data; aclock->destroy_notify = destroy_notify; + gst_object_ref_sink (aclock); + return (GstClock *) aclock; }