GNOME Bugzilla – Bug 632682
[matroskademux] Handle missing CodecPrivate for Vorbis/Theora
Last modified: 2010-10-25 06:32:43 UTC
Created attachment 172829 [details] Crafted WebM file that has no CodecPrivate block for Vorbis This would otherwise crash when dereferencing a NULL pointer.
Created attachment 172830 [details] Crafted Matroska file that has no CodecPrivate block for Vorbis Matroska version of the same.
Pipeline to reproduce crash: gst-launch filesrc location=vorbis-no-codecprivate.mkv ! matroskademux ! fakesink
Created attachment 172832 [details] [review] trivial patch
Created attachment 172833 [details] [review] trivial patch
Created attachment 172834 [details] [review] actual patch I took the liberty of piggy-packing two trivial fixes in matroskademux, take them if you want them.
If we return a GST_FLOW_ERROR, we should post a proper error message on the bus. I've changed the patch to do that. (I guess ideally we'd just mark that track as broken and skip it and continue playing other non-broken tracks if there are any, but I guess it's not really worth it seeing that this is just plain broken, and we're just trying to prevent crashes though hand-crafted files.) commit 7fcd7d8cf29c22ff1bbcd1969fa353306a4d49e7 Author: Philip Jägenstedt <philipj@opera.com> Date: Wed Oct 20 10:21:48 2010 +0200 matroskademux: Remove useless clearing of send_xiph_headers for Dirac This looks like a mistake when copy-pasting the Theora code. https://bugzilla.gnome.org/show_bug.cgi?id=632682 commit 6cf398cdf30a65481ec160165048c4396cff76f7 Author: Philip Jägenstedt <philipj@opera.com> Date: Wed Oct 20 13:28:28 2010 +0200 matroskademux: don't crash if vorbis/theora codec data is missing Error out properly in this case instead of crashing. https://bugzilla.gnome.org/show_bug.cgi?id=632682
Comment on attachment 172832 [details] [review] trivial patch Newer versions of indent sadly do the '! !' thing instead of '!!'. I think we should stick to what the newer versions do.
OK, that explains the weird style at least.