Commit 24eed322 authored by Mark Nauwelaerts's avatar Mark Nauwelaerts
Browse files

gst/avi/gstavimux.c: Minor fix/cleanup in header field calculation.

Original commit message from CVS:
* gst/avi/gstavimux.c: (gst_avi_mux_audsink_set_caps):
Minor fix/cleanup in header field calculation.
parent 85c6c252
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),
......
......@@ -738,7 +738,6 @@ gst_avi_mux_audsink_set_caps (GstPad * pad, GstCaps * vscaps)
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;
......@@ -748,7 +747,9 @@ gst_avi_mux_audsink_set_caps (GstPad * pad, GstCaps * vscaps)
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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment