GNOME Bugzilla – Bug 725008
matroskademux: crash with 24bit raw audio
Last modified: 2014-02-27 00:55:56 UTC
Created attachment 270060 [details] [review] Patch to not set the alignment to add numbers The demuxer sets context->alignment to bitdepth / 8, which is 3. Later it tries to align the sub buffer to 3 sub = gst_matroska_demux_align_buffer (demux, sub, stream->alignment); which fails and returns NULL, which causes crash in next line
Would you agree that context->alignment should end up being a power of 2 not just a multiple of 2? (Hypothetical case: bits=40 -> alignment=5 -> fixed alignment=6 bytes)
I guess so. Alignment = 6bytes does seem weird.
commit f3163fb45f748f63d13e1f63273b7155f22e3070 Author: Tim-Philipp Müller <tim@centricular.com> Date: Thu Feb 27 00:43:48 2014 +0000 matroskademux: align raw audio memory to powers of two https://bugzilla.gnome.org/show_bug.cgi?id=725008 commit c3dc53e55162df238aecbb1b7f065cf342d6df73 Author: Tim-Philipp Müller <tim@centricular.com> Date: Thu Feb 27 00:37:20 2014 +0000 matroskademux: calculate alignment properly for audio depths not a multiple of 8 commit d33b4dce63c967dedd5477fc76ecd27fec434d49 Author: Matej Knopp <matej.knopp@gmail.com> Date: Sun Feb 23 19:09:24 2014 +0100 matroskademux: fix crash with 24-bit raw audio Do not try to align audio buffers to odd numbers, which will get us a NULL buffer which we then crash on. https://bugzilla.gnome.org/show_bug.cgi?id=725008