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
This commit is contained in:
Sebastian Dröge 2017-05-15 14:20:32 +03:00
parent 7185a7ac98
commit 2a8784e218

View file

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