avimux: Don't override maximum audio chunk size with the scale again just before writing it

set_fields() should only be called in the beginning, otherwise we will never
remember the maximum audio chunk size and write a wrong block align... which
then causes wrong timestamps and other problems.
This commit is contained in:
Sebastian Dröge 2016-04-27 14:09:03 +03:00
parent 34dc1298e9
commit e538608b3f

View file

@ -1830,7 +1830,6 @@ gst_avi_mux_stop_file (GstAviMux * avimux)
audpad->auds.blockalign = audpad->max_audio_chunk;
if (audpad->auds.blockalign == 0)
audpad->auds.blockalign = 1;
gst_avi_mux_audsink_set_fields (avimux, audpad);
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);