Previously, altering metadata could only be done rewriting the
file (or with a tempfile with the assumption the tempfile would
replace the existing file). However, there are good reasons to
write a new file instead. One API call is added for that, and
one is changed to enable this.
ogg_sync_check is not properly exported by libogg, causing problems
compiling on win32. It can be removed though, as that check is
included already through ogg_sync_buffer.
This commit adds the capability to find the end of a link through
seeking instead of by reading forward, which should be much more
efficient. It also exposes this capability through the new API
function FLAC__stream_decoder_skip_single_link
This commit includes additions to the test suite and fuzzers
When two ogg streams were made with two different calls to `flac`
within the same second, their serial numbers would be the same.
This caused problems with seeking in the test suite. While in
theory, libFLAC should be able to seek in a chained stream with
two equal serial numbers without fail, in practice seeking in
chained streams is hard enough. So, this commit makes sure the
chained test files have links with unequal serial numbers.
Concerning the use of specific casts, shifts and masks: For some
reason, on some platforms, seemingly, saturating arithmetic was
used where overflow was expected, in effect always seeding with
the same number, UINT32_MAX.
When compiled with NDEBUG defined, the test suite output was
extremely noisy. As both these debug messages have served me no
use the last few years, it is time to remove them.
Without this commit, libFLAC happily overwrites symlinks with
a new file. With this patch, it tries to follow the symlink,
and fails if it points to another filesystem (i.e. when rename
doesn't work)
Fixes various cases of erratic behaviour (most notably output not
starting on the first character of a line). Also, some warnings
and errors now mark the location in the stream where this error
seems to have occured
The `flac` command had 4 levels of documentation: short help,
help, explain and manpage. The explain is removed in favour of
referring to the much more comprehensive manpage
For some reason, i386 ASAN does not copy a pointer somewhere in the
code. Using gdb I get a mention of a synthetic pointer, so perhaps
the compiler instrumented with ASAN thinks this pointer isn't
used. Anyway, commit adds a check for that null pointer which
isn't necessary otherwise and is only activated for i386 ASAN.
Credit: Oss-Fuzz
Issue: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=58524