diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | gst/avi/gstavimux.c | 5 |
2 files changed, 8 insertions, 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> * gst/matroska/matroska-mux.c: (gst_matroska_mux_reset), diff --git a/gst/avi/gstavimux.c b/gst/avi/gstavimux.c index e93c8b18..b432c6aa 100644 --- a/gst/avi/gstavimux.c +++ b/gst/avi/gstavimux.c @@ -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; |