aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-audio-src.c
diff options
context:
space:
mode:
Diffstat (limited to 'libempathy-gtk/empathy-audio-src.c')
-rw-r--r--libempathy-gtk/empathy-audio-src.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/libempathy-gtk/empathy-audio-src.c b/libempathy-gtk/empathy-audio-src.c
index 0497439bf..a3416f2ea 100644
--- a/libempathy-gtk/empathy-audio-src.c
+++ b/libempathy-gtk/empathy-audio-src.c
@@ -343,7 +343,15 @@ out:
GstElement *
empathy_audio_src_new (void)
{
- return GST_ELEMENT (g_object_new (EMPATHY_TYPE_GST_AUDIO_SRC, NULL));
+ static gboolean registered = FALSE;
+
+ if (!registered) {
+ if (!gst_element_register (NULL, "empathyaudiosrc",
+ GST_RANK_NONE, EMPATHY_TYPE_GST_AUDIO_SRC))
+ return NULL;
+ registered = TRUE;
+ }
+ return gst_element_factory_make ("empathyaudiosrc", NULL);
}
void
@@ -375,3 +383,5 @@ empathy_audio_src_get_volume (EmpathyGstAudioSrc *src)
return volume;
}
+
+