Apparently this had been fixes in Audacity and other projects
but no one had bothered to feed them back upstream. Thanks to
lvqcl for researching this and finding the relevant patches.
Thanks to Ozkan Sezer for validating them.
Closes: https://sourceforge.net/p/flac/bugs/438/
The previous fixes for metadata_iterators didn't completely fix the problem.
The behavior of chain_prepare_for_write_() must always be the same as the
behavior of FLAC__metadata_chain_check_if_tempfile_needed(). Before this
fix, one check was missing in FLAC__metadata_chain_check_if_tempfile_needed(),
and also chain_prepare_for_write_() checked the sizes of the metadata blocks
*after* making the changes to the chain, while
FLAC__metadata_chain_check_if_tempfile_needed() does it *before* the changes.
This patch changes FLAC__metadata_chain_check_if_tempfile_needed() so that it
keeps some info (lbs_state, lbs_size) about estimated changes and then uses
it to check the block sizes.
It also simplifies FLAC__metadata_chain_check_if_tempfile_needed() a little.
Patch-from: lvqcl <lvqcl.mail@gmail.com>
MSVC2105 update2 compiles the C code:
abs_residual_partition_sums[partition] =
(FLAC__uint32)_mm_cvtsi128_si32(mm_sum);
into this:
movq QWORD PTR [rsi], xmm2
while it should be:
movd eax, xmm2
mov QWORD PTR [rsi], rax
With this patch, MSVC emits:
movq QWORD PTR [rsi], xmm2
mov DWORD PTR [rsi+4], r9d
so the price of this workaround is 1 extra write instruction per
partition.
Patch-from: lvqcl <lvqcl.mail@gmail.com>
Without this fix, its possible for libFLAC to create an oversized
padding metadata block when:
a) it merges existing padding blocks
or
b) it expands padding block during metadata changes
resulting in a corrupt FLAC file.
Patch-from: lvqcl <lvqcl.mail@gmail.com>
Allow setting of ENABLE_64_BIT_WORDS preprocessor variable for
libFLAC_dynamic, libFLAC_static and test_libFLAC projects and x64
platform.
Patch-from: lvqcl <lvqcl.mail@gmail.com>
Limit allow image file size to slightly less than 2^24 bytes so that
the file size plus extra house keeping data is strictly less that
2^24 bytes in size.
Patch-from: lvqcl <lvqcl.mail@gmail.com>
With this change, flac now accepts cuesheets where the ISRC field is
enclosed in double quotes. Added a test for this as well.
Closes: https://sourceforge.net/p/flac/bugs/436/
The former is POSIX while the later is a GNU glibc-ism that does not
exist in (for example) the Musl C library that is used in OpenWrt.
Reported-by: <neheb@hushmail.com>
* test_bin.sh looks like it was a personal use script for the original
developer Josh Coalson and referenced directories outside the actual
repository.
* test_wrapper.sh was trivial and un-used.
Some operating systems such as OS/2 don't have any of the CLOCK* API
functions so add gettimeofday() as a fallback.
Signed-off-by: Dave Yeo <dave.r.yeo@gmail.com>
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
Usage of internal aliases for float and double do not provide
substantial value. For integer-only libs, the macro
FLAC__INTEGER_ONLY_LIBRARY is used in the appropriate places
already.
Also, adapt copyright messages to include 2016.
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
Closes: https://github.com/xiph/flac/pull/10
Handy for toolchains or operating systems that don't support AVX or AVX2
like OS/2.
Signed-off-by: Dave Yeo <dave.r.yeo@gmail.com>
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
* Simplifies *print functions.
* Improves file related functions.
* Preparation to move all file related functions into libFLAC.
Patch-from: lvqcl <lvqcl.mail@gmail.com>
Previously src/plugin_common library was used by FLAC's own Winamp plugin
(MSVC/Windows) and by the XMMS plugin (*nix). The Winamp plugin is long
gone from FLAC tree, so plugin_common is unused on Windows.
Patch-from: lvqcl <lvqcl.mail@gmail.com>
Files share/utf8/charset.c and share/utf8/iconvert.c aren't needed
under Windows. This patch removes them from MSVC build system.
Patch-from: lvqcl <lvqcl.mail@gmail.com>
OpenBSD defineds `TIOCGWINSZ` in `termios.h` which is already being
included, so this fix should work on most POSIX systems.
Closes: https://sourceforge.net/p/flac/bugs/435/