Index: gst/avi/gstavimux.c
===================================================================
--- gst/avi/gstavimux.c	(revision 538)
+++ gst/avi/gstavimux.c	(working copy)
@@ -639,6 +639,7 @@
     avipad->auds.blockalign /= 8;
     avipad->auds.blockalign *= avipad->auds.channels;
     avipad->auds.av_bps = avipad->auds.blockalign * avipad->auds.rate;
+    avipad->parent.hdr.rate = avipad->auds.rate;
   } else if (!strcmp (mimetype, "audio/mpeg") ||
       !strcmp (mimetype, "audio/x-vorbis") ||
       !strcmp (mimetype, "audio/x-ac3")) {
@@ -683,7 +684,8 @@
       goto refuse_caps;
   }
 
-  avipad->parent.hdr.rate = avipad->auds.blockalign * avipad->auds.rate;
+  if (!avipad->parent.hdr.rate)
+    avipad->parent.hdr.rate = avipad->auds.blockalign * avipad->auds.rate;
   avipad->parent.hdr.samplesize = avipad->auds.blockalign;
   avipad->parent.hdr.scale = 1;
 
