Since both g_value_set_object() and g_weak_ref_get() takes a reference
there will be two new references to the GstWebRTCICE object when there
should be only one. g_value_take_object() has the same functionality as
g_value_set_object() but does not take a reference.
Without this change, the GstWebRTCICE object will be leaked.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2333>
switch (prop_id) {
case PROP_ICE:
- g_value_set_object (value, g_weak_ref_get (&stream->ice_weak));
+ g_value_take_object (value, g_weak_ref_get (&stream->ice_weak));
break;
case PROP_STREAM_ID:
g_value_set_uint (value, stream->stream_id);