avimux: Don't override maximum audio chunk size with the scale again just before...
authorSebastian Dröge <sebastian@centricular.com>
Wed, 27 Apr 2016 11:09:03 +0000 (14:09 +0300)
committerSebastian Dröge <sebastian@centricular.com>
Wed, 27 Apr 2016 11:09:03 +0000 (14:09 +0300)
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.

gst/avi/gstavimux.c

index b28a0174ae946dae79b023dd13cc2c0fa79a4c5f..ed78c1f1e1ee4b35a27ff43a8f265056353f0b69 100644 (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);