si-interfaces: transfer full when returning from _get_stream_parent_endpoint

This commit is contained in:
Julian Bouzas 2020-04-28 11:29:15 -04:00 committed by George Kiagiadakis
parent 230c103f18
commit 791e9170aa
6 changed files with 10 additions and 7 deletions

View file

@ -146,7 +146,8 @@ wp_session_item_default_get_associated_proxy (WpSessionItem * self,
WpSessionItemPrivate *priv;
if (WP_IS_SI_STREAM (self)) {
WpSiEndpoint *ep = wp_si_stream_get_parent_endpoint (WP_SI_STREAM (self));
g_autoptr (WpSiEndpoint) ep =
wp_si_stream_get_parent_endpoint (WP_SI_STREAM (self));
priv = wp_session_item_get_instance_private (WP_SESSION_ITEM (ep));
} else {
priv = wp_session_item_get_instance_private (self);

View file

@ -251,7 +251,7 @@ wp_si_stream_get_properties (WpSiStream * self)
* wp_si_stream_get_parent_endpoint: (virtual get_parent_endpoint)
* @self: the session item
*
* Returns: (transfer none): the endpoint that this stream belongs to
* Returns: (transfer full): the endpoint that this stream belongs to
*/
WpSiEndpoint *
wp_si_stream_get_parent_endpoint (WpSiStream * self)

View file

@ -512,7 +512,7 @@ si_adapter_get_stream_properties (WpSiStream * self)
static WpSiEndpoint *
si_adapter_get_stream_parent_endpoint (WpSiStream * self)
{
return WP_SI_ENDPOINT (self);
return WP_SI_ENDPOINT (g_object_ref (self));
}
static void

View file

@ -323,7 +323,7 @@ si_simple_node_endpoint_get_stream_registration_info (WpSiStream * self)
static WpSiEndpoint *
si_simple_node_endpoint_get_stream_parent_endpoint (WpSiStream * self)
{
return WP_SI_ENDPOINT (self);
return WP_SI_ENDPOINT (g_object_ref (self));
}
static void

View file

@ -327,7 +327,8 @@ si_standard_link_activate_execute_step (WpSessionItem * item,
switch (step) {
case STEP_ACQUIRE: {
WpSiEndpoint *out_endpoint, *in_endpoint;
g_autoptr (WpSiEndpoint) out_endpoint = NULL;
g_autoptr (WpSiEndpoint) in_endpoint = NULL;
WpSiStreamAcquisition *out_acquisition, *in_acquisition;
out_endpoint = wp_si_stream_get_parent_endpoint (self->out_stream);
@ -382,7 +383,8 @@ static void
si_standard_link_activate_rollback (WpSessionItem * item)
{
WpSiStandardLink *self = WP_SI_STANDARD_LINK (item);
WpSiEndpoint *out_endpoint, *in_endpoint;
g_autoptr (WpSiEndpoint) out_endpoint = NULL;
g_autoptr (WpSiEndpoint) in_endpoint = NULL;
WpSiStreamAcquisition *out_acquisition, *in_acquisition;
out_endpoint = wp_si_stream_get_parent_endpoint (self->out_stream);

View file

@ -84,7 +84,7 @@ test_si_endpoint_get_stream_properties (WpSiStream * self)
static WpSiEndpoint *
test_si_endpoint_get_stream_parent_endpoint (WpSiStream * self)
{
return WP_SI_ENDPOINT (self);
return WP_SI_ENDPOINT (g_object_ref (self));
}
static void