Parts of the code use realloc like
x = safe_realloc(x, somesize);
when this is the case, the safe_realloc variant used must free the
old memory block in case it fails, otherwise it will leak. However,
there are also instances in the code where handling is different:
if (0 == (x = safe_realloc(y, somesize)))
return false
in this case, y should not be freed, as y is not set to NULL we
could encounter double frees. Here the safe_realloc_nofree
functions are used.
See https://github.com/xiph/flac/issues/76 for details
Also, move include of stddef.h and stdarg.h up to top of file to
make clear that they are included unconditionally
* Change replaygain analysis so it is able to handle 32-bit PCM
* Increase FLAC__REFERENCE_CODEC_MAX_BITS_PER_SAMPLE to 32
* Fix switch-case fallthrough
Decoding for 32-bit files is added, including the ability to decode
a 33-bit side subframe. However, residuals are assumed to be limited
to a 32-bit signed int, the encoder must make sure of this
libFLAC DLLs were exposing windows_unicode_filename.h functions
because flac and metaflac needed to set flac_internal_set_utf8_
filenames. Files windows_unicode_filename.{c/h} and
win_utf8_io.[c/h] are merged, and all non-utf8 parts are removed.
With this commit, the libFLAC DLL interface is the same as the
libFLAC interface of shared libraries on other platforms
... FLAC__stream_decoder_get_client_data. Also the function
definition was moved to its 'siblings'. This way, the function
fits better in the API with respect to naming.
Quite a lot of decoders have trouble streaming or seeking in a
file with frames that only consist of constant subframes because
of the large difference between the largest and smallest subframe.
To remedy this, this commit makes it possible to disable the use
of constant subframes for the last subframe in case all others are
constant with a new API function. This means the minimum bitrate
for a FLAC file encoded with this function used is raised to
1bit/sample (i.e. 48kbit/s for 48kHz material). This commit also
adds tests to the test suite
Now that many DACs support up to 768kHz, add support for these
sample rates to the encoder. Files produced with these sample rates
are already decodable by the reference decoder. Update documentation
and tests accordingly.
Doxygen sees '#' as a cross-reference, which this is not in this case. This will silence the following warning that pops up frequently when building with docs:
warning: explicit link request to 'defines' could not be resolved
The code shorthand tag was removed in include\FLAC\all.h to remain synonymous with other mentions of #define.
the issue is, flac and metaflac exes rely on flac_internal_???_utf8()
procedures from windows_unicode_filenames.c and there is no easy way
to exclude them from exports without breaking things. So export them
explicitly (they are exported anyway w/o this patch), but add a FIXME
note about the kludge in windows_unicode_filenames.c.
Some libcs like uClibc-ng can optionally disable deprecated functions.
utime is one of them. When done so, both the header and the function go
missing.
This fixes flac_utime to work in such a situation.