+2009-01-07 Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
+
+ * gst/avi/gstavimux.c: (gst_avi_mux_audsink_set_caps):
+ Minor fix/cleanup in header field calculation.
+
2009-01-06 Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
* gst/matroska/matroska-mux.c: (gst_matroska_mux_reset),
avipad->auds.av_bps = avipad->auds.blockalign * avipad->auds.rate;
} else if (!strcmp (mimetype, "audio/x-mulaw")) {
avipad->auds.format = GST_RIFF_WAVE_FORMAT_MULAW;
- avipad->auds.av_bps = 8;
avipad->auds.size = 8;
avipad->auds.blockalign = avipad->auds.channels;
avipad->auds.av_bps = avipad->auds.blockalign * avipad->auds.rate;
if (!avipad->auds.format)
goto refuse_caps;
- avipad->parent.hdr.rate = avipad->auds.rate;
+ /* by spec, hdr.rate is av_bps related, is calculated that way in stop_file,
+ * and reduces to sample rate in PCM like cases */
+ avipad->parent.hdr.rate = avipad->auds.av_bps / avipad->auds.blockalign;
avipad->parent.hdr.samplesize = avipad->auds.blockalign;
avipad->parent.hdr.scale = 1;