GNOME Bugzilla – Bug 566769
[flacdec] crash in push mode with large header packet (image)
Last modified: 2011-03-28 22:52:23 UTC
While trying to play a remote file (over DAAP) using Rhythmbox, I saw the following crash: 0xb29b6c5f in FLAC__bitreader_read_raw_uint32 (br=0xb346c000, val=0xb1daee74, bits=8) at bitreader.c:507 507 *val = br->buffer[br->consumed_words] >> (FLAC__BITS_PER_WORD-bits); (gdb) bt
+ Trace 211313
Notably, playing the same file locally doesn't result in a crash, so I'm guessing the problem might be in Gstreamer feeding enough data to FLAC rather than a bug in FLAC itself. This is reproducible *every* time I try it. rhythmbox: 0.11.5-0ubuntu8 gstreamer0.10-plugins-good: 0.10.7-3ubuntu0.1 libgstreamer0.10-0: 0.10.18-4ubuntu1 libflac8: 1.2.1-1.2
There is also a copy of the file that was causing the crash at http://tevp.net/03%20-%20Fire%20and%20Ice.flac but note that it's 17.3mb in size...
The problem is that this file contains a very huge image in the metadata and we can't feed it in chunks to the flac API. We probably need to manually parse frames before calling the flac API, bleh.
You only want to parse the metadata blocks though, the audio blocks are very complex and expensive to parse
Imo, this is a FLAC bug, unless we're supposed to be parsing frames before they're sent to libFLAC.
Maybe so, but for all practical purposes libFLAC seems to be unmaintained, so if we don't want to crash we probably have to fix this ourselves. We could just wait for the audioparsers (incl. flacparse) to be moved to -good of course.
commit c365fbddba14669e2341da9089ce3bbb338c5abc Author: Tim-Philipp Müller <tim.muller@collabora.co.uk> Date: Mon Mar 28 23:46:47 2011 +0100 flacdec: fix issues with large metadata blocks when streaming unframed flac Parse metadata blocks when handling unparsed flac in push mode. This works around a bunch of issues with the flac decoder when handling metadata blocks that are larger than the max. flac framesize, which coverart blocks often are. We need to have all the data for these blocks available when we pass data to libflac. http://gstreamer-devel.966125.n4.nabble.com/Flac-files-that-will-playback-but-not-stream-td3338198.html#a3395276 https://bugzilla.gnome.org/show_bug.cgi?id=566769