After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 758912 - avimux: don't crash if we never got audio caps before stopping
avimux: don't crash if we never got audio caps before stopping
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal normal
: 1.6.2
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-12-01 17:34 UTC by Michael Olbrich
Modified: 2015-12-07 09:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (1.17 KB, patch)
2015-12-01 17:34 UTC, Michael Olbrich
committed Details | Review

Description Michael Olbrich 2015-12-01 17:34:29 UTC
Created attachment 316620 [details] [review]
patch

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;
[...]
Comment 1 Sebastian Dröge (slomo) 2015-12-01 18:11:14 UTC
commit 4c50ad0e27bfc431541897507c2bc6b90080aac7
Author: Michael Olbrich <m.olbrich@pengutronix.de>
Date:   Wed Nov 18 16:10:11 2015 +0100

    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