mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 16:50:47 +00:00
avimux: set audio header rate according to calculated bps in stop_file
... now that set_fields is no longer called there by
e538608b3f
This commit is contained in:
parent
e0b26059ae
commit
eb336a804b
1 changed files with 3 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue