mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 14:26:43 +00:00
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.
This commit is contained in:
parent
85c6c25264
commit
24eed322dc
2 changed files with 8 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
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>
|
2009-01-06 Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
|
||||||
|
|
||||||
* gst/matroska/matroska-mux.c: (gst_matroska_mux_reset),
|
* 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;
|
avipad->auds.av_bps = avipad->auds.blockalign * avipad->auds.rate;
|
||||||
} else if (!strcmp (mimetype, "audio/x-mulaw")) {
|
} else if (!strcmp (mimetype, "audio/x-mulaw")) {
|
||||||
avipad->auds.format = GST_RIFF_WAVE_FORMAT_MULAW;
|
avipad->auds.format = GST_RIFF_WAVE_FORMAT_MULAW;
|
||||||
avipad->auds.av_bps = 8;
|
|
||||||
avipad->auds.size = 8;
|
avipad->auds.size = 8;
|
||||||
avipad->auds.blockalign = avipad->auds.channels;
|
avipad->auds.blockalign = avipad->auds.channels;
|
||||||
avipad->auds.av_bps = avipad->auds.blockalign * avipad->auds.rate;
|
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)
|
if (!avipad->auds.format)
|
||||||
goto refuse_caps;
|
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.samplesize = avipad->auds.blockalign;
|
||||||
avipad->parent.hdr.scale = 1;
|
avipad->parent.hdr.scale = 1;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue