1
0
Fork 0
mirror of https://gitlab.gnome.org/GNOME/calls.git synced 2024-11-16 17:16:17 +00:00

sip: pipeline: clean up in finalize ()

This commit is contained in:
Evangelos Ribeiro Tzaras 2021-04-01 18:43:21 +02:00
parent 71cbc5c636
commit e6b730b805

View file

@ -257,6 +257,26 @@ set_property (GObject *object,
} }
static void
finalize (GObject *object)
{
CallsSipMediaPipeline *self = CALLS_SIP_MEDIA_PIPELINE (object);
calls_sip_media_pipeline_stop (self);
gst_object_unref (self->send_pipeline);
gst_object_unref (self->recv_pipeline);
gst_bus_remove_watch (self->bus_send);
gst_object_unref (self->bus_send);
gst_bus_remove_watch (self->bus_recv);
gst_object_unref (self->bus_recv);
g_free (self->remote);
G_OBJECT_CLASS (calls_sip_media_pipeline_parent_class)->finalize (object);
}
static void static void
calls_sip_media_pipeline_class_init (CallsSipMediaPipelineClass *klass) calls_sip_media_pipeline_class_init (CallsSipMediaPipelineClass *klass)
{ {
@ -264,6 +284,7 @@ calls_sip_media_pipeline_class_init (CallsSipMediaPipelineClass *klass)
object_class->set_property = set_property; object_class->set_property = set_property;
object_class->get_property = get_property; object_class->get_property = get_property;
object_class->finalize = finalize;
/* Maybe we want to turn Codec into a GObject later */ /* Maybe we want to turn Codec into a GObject later */
props[PROP_CODEC] = g_param_spec_pointer ("codec", props[PROP_CODEC] = g_param_spec_pointer ("codec",