--- ext/libav/gstavmux.c	2014-04-06 09:05:40.000000000 +0200
+++ ext/libav/gstavmux.c	2014-08-07 21:33:49.144743467 +0200
@@ -192,6 +192,7 @@ gst_ffmpegmux_base_init (gpointer g_clas
   GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
   GstPadTemplate *videosinktempl, *audiosinktempl, *srctempl;
   AVOutputFormat *in_plugin;
+  gchar *p, *name;
   GstCaps *srccaps, *audiosinkcaps, *videosinkcaps;
   enum AVCodecID *video_ids = NULL, *audio_ids = NULL;
   gchar *longname, *description;
@@ -203,6 +204,13 @@ gst_ffmpegmux_base_init (gpointer g_clas
       GST_FFMUX_PARAMS_QDATA);
   g_assert (in_plugin != NULL);
 
+  p = name = g_strdup (in_plugin->name);
+  while (*p) {
+    if (*p == '.' || *p == ',')
+      *p = '_';
+    p++;
+  }
+
   /* construct the element details struct */
   replacement = gst_ffmpegmux_get_replacement (in_plugin->name);
   is_formatter = gst_ffmpegmux_is_formatter (in_plugin->name);
@@ -229,19 +237,19 @@ gst_ffmpegmux_base_init (gpointer g_clas
   g_free (description);
 
   /* Try to find the caps that belongs here */
-  srccaps = gst_ffmpeg_formatid_to_caps (in_plugin->name);
+  srccaps = gst_ffmpeg_formatid_to_caps (name);
   if (!srccaps) {
     GST_DEBUG ("Couldn't get source caps for muxer '%s', skipping format",
-        in_plugin->name);
+        name);
     goto beach;
   }
 
-  if (!gst_ffmpeg_formatid_get_codecids (in_plugin->name,
+  if (!gst_ffmpeg_formatid_get_codecids (name,
           &video_ids, &audio_ids, in_plugin)) {
     gst_caps_unref (srccaps);
     GST_DEBUG
         ("Couldn't get sink caps for muxer '%s'. Most likely because no input format mapping exists.",
-        in_plugin->name);
+        name);
     goto beach;
   }
 
@@ -250,15 +258,15 @@ gst_ffmpegmux_base_init (gpointer g_clas
 
   /* fix up allowed caps for some muxers */
   /* FIXME : This should be in gstffmpegcodecmap.c ! */
-  if (strcmp (in_plugin->name, "flv") == 0) {
+  if (strcmp (name, "flv") == 0) {
     const gint rates[] = { 44100, 22050, 11025 };
 
     gst_ffmpeg_mux_simple_caps_set_int_list (audiosinkcaps, "rate", 3, rates);
-  } else if (strcmp (in_plugin->name, "dv") == 0) {
+  } else if (strcmp (name, "dv") == 0) {
     gst_caps_set_simple (audiosinkcaps,
         "rate", G_TYPE_INT, 48000, "channels", G_TYPE_INT, 2, NULL);
 
-  } else if (strcmp (in_plugin->name, "gif") == 0) {
+  } else if (strcmp (name, "gif") == 0) {
     if (videosinkcaps)
       gst_caps_unref (videosinkcaps);
 
