Commit eb336a80 authored by Mark Nauwelaerts's avatar Mark Nauwelaerts

avimux: set audio header rate according to calculated bps in stop_file

... now that set_fields is no longer called there by
e538608b
parent e0b26059
......@@ -1830,6 +1830,9 @@ gst_avi_mux_stop_file (GstAviMux * avimux)
audpad->auds.blockalign = audpad->max_audio_chunk;
if (audpad->auds.blockalign == 0)
audpad->auds.blockalign = 1;
/* note that hdr.rate is actually used by demux in cbr case */
if (avipad->hdr.scale <= 1)
avipad->hdr.rate = audpad->auds.av_bps / audpad->auds.blockalign;
avimux->avi_hdr.max_bps += audpad->auds.av_bps;
avipad->hdr.length = gst_util_uint64_scale (audpad->audio_time,
avipad->hdr.rate, avipad->hdr.scale * GST_SECOND);
......
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