There might be other chunks after the data chunk, so clipping the chunk
size with the data size can lead to a negative number and all following
calculations go wrong and cause crashes or worse.
This was introduced in 3ac119bbe2.
https://bugzilla.gnome.org/show_bug.cgi?id=783760
In case wavparse receives a manually injected FLUSH_STOP event
while operating in pull mode we get criticals because we'd try
to clear a NULL adapter.
https://bugzilla.gnome.org/show_bug.cgi?id=777123
https://github.com/mesonbuild/meson
With contributions from:
Tim-Philipp Müller <tim@centricular.com>
Jussi Pakkanen <jpakkane@gmail.com> (original port)
Highlights of the features provided are:
* Faster builds on Linux (~40-50% faster)
* The ability to build with MSVC on Windows
* Generate Visual Studio project files
* Generate XCode project files
* Much faster builds on Windows (on-par with Linux)
* Seriously fast configure and building on embedded
... and many more. For more details see:
http://blog.nirbheek.in/2016/05/gstreamer-and-meson-new-hope.htmlhttp://blog.nirbheek.in/2016/07/building-and-developing-gstreamer-using.html
Building with Meson should work on both Linux and Windows, but may
need a few more tweaks on other operating systems.
The wav spec tells that 'fmt' (and 'bext' if present) must come before 'data'.
There is no requirement for 'fmt' to be first. We already had a list of chunks
to skip, but it is easier to just skip any chunk while seeking for 'fmt'.
This fixes reading files generated by ProTools.
Especially in push mode we would completely ignore the size of the data chunk
when not stop position is given for the seek. Instead make sure that the end
offset is at most the end of the data chunk if known.
Without this we would output anything after the data chunk, possibly causing
loud noises if the media file is followed by an INFO chunk or an ID3 tag.
We use that to signal "infinity", taking the difference between that and some
other value is not going to give us any useful result for the end offsets of
segments.
Even if we have more data queued up when flushing than the size of the data
chunk, don't process and output it. If the data size is known, this likely
contains another chunk (e.g. an INFO chunk) or things like ID3 tags. Just
outputting them as if they were data is going to cause unexpected behaviour
and unpleasant audio noises.
Assignment is done to variable segment.stop when the intention was to assign to
local variable stop. Instead of overwriting it, the value is now clamped and
segment.stop is set to it soon after.
CID #1265773
We have to skip 12 bytes of data for the chunk, and the data size
passed to the sub-chunk parsing functions should have 4 bytes less
than the data size.
Also when parsing the sub-chunks, check if we actually have enough
data to read instead of just crashing.
https://bugzilla.gnome.org/show_bug.cgi?id=736266
If the wav header contains an extended chunk, we want to keep
the codec_data field, but not for raw audio.
This fixes some elements (such as adder) from failing to intersect
raw audio caps which would otherwise be intersectable.
They are very confusing for people, and more often than not
also just not very accurate. Seeing 'last reviewed: 2005' in
your docs is not very confidence-inspiring. Let's just remove
those comments.