avimux: don't crash if we never got audio caps before stopping
authorMichael Olbrich <m.olbrich@pengutronix.de>
Wed, 18 Nov 2015 15:10:11 +0000 (16:10 +0100)
committerSebastian Dröge <sebastian@centricular.com>
Tue, 1 Dec 2015 18:10:19 +0000 (20:10 +0200)
commit4c50ad0e27bfc431541897507c2bc6b90080aac7
tree3412116feb0855062d4eda73069980468f923e2d
parentb208ae72eeaf80fae3cbbb3799cbbc37da2c8164
avimux: don't crash if we never got audio caps before stopping

auds.blockalign is set once the first caps arrive. If
gst_avi_mux_stop_file() is called before this happens then auds.blockalign
is zero and gst_avi_mux_audsink_set_fields() cause a crash:
[...]
avipad->parent.hdr.rate = avipad->auds.av_bps / avipad->auds.blockalign;
[...]

https://bugzilla.gnome.org/show_bug.cgi?id=758912
gst/avi/gstavimux.c