[Bug 759778] New: flacparse: large padding headers cause high memory consumption

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Tue Dec 22 07:02:46 PST 2015


https://bugzilla.gnome.org/show_bug.cgi?id=759778

            Bug ID: 759778
           Summary: flacparse: large padding headers cause high memory
                    consumption
    Classification: Platform
           Product: GStreamer
           Version: git master
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: Normal
         Component: gst-plugins-good
          Assignee: gstreamer-bugs at lists.freedesktop.org
          Reporter: dv at pseudoterminal.org
        QA Contact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---

Some FLAC files have large padding headers. According to the FLAC spec, padding
headers do not contain valid data and mainly exist as a reserve space for
future metadata modifications/additions. Yet, flacparse accumulates incoming
buffers until all headers are parsed, including padding headers, and then feeds
all this data in one go to downstream. As a result, playback can take
considerably longer to start, especially on embedded devices. Memory usage also
greatly increases, and can lead to out-of-memory errors on such devices. It
would be good if flacparse ignores/discards padding headers and _not_ feed them
to downstream. Better yet, since the size of the header is known from the
start, just skip it entirely (at least in pull mode).

Test files can be generated with the following gst-launch line:

gst-launch-1.0 audiotestsrc wave=sine num-buffers=30 samplesperbuffer=44100 !
"audio/x-raw, rate=44100, channels=2" ! flacenc padding=16777215 ! filesink
location=test-padding.flac

Note the padding=16777215 property. 16777215 is the maximum size flacenc will
allow for a padding block. Values larger than that cause libflac to apply
padding in a different, undetermined way.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list