* 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/
OpenBSD needs the enviroment variables `AUTOCONF_VERSION` and
`AUTOMAKE_VERSION` to be set in order to find these tools.
The script now tests (individually) if they are already set and if they
aren't sets them to something that is known to work on OpenBSD 5.8
On some setups, benchmark_residual linkage fails with an undefined
reference to clock_gettime(). Adding -lrt fixes that.
Patch-from: Ozkan Sezer <sezeroz@gmail.com>
* src/libFLAC/metadata_iterators.c:3247: (error) va_list `va` was opened
but not closed with va_end().
* src/share/grabbag/snprintf.c:66: (error) va_list `va` was opened but
not closed with va_end().
* src/utils/flactimer/main.cpp:84: (warning) Either the condition `!fout`
is redundant or there is possible null pointer dereference.
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
Closes: https://github.com/xiph/flac/pull/8
This is more of a "human language versus programmer parlor" issue.
src/flac/main.c will return usage error for an argument greater
than FLAC__MAX_RICE_PARTITION_ORDER (15u).
While in programming "0..16" usually means "from zero to 15", in
natural human-to-human talk, it would rather mean "from zero to 16".
This changes the wording a bit to avoid this misunderstanding.
Closes: http://sourceforge.net/p/flac/bugs/352/
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
The old version of `FLAC__bitwriter_write_raw_uint32()` assumes that the
unused bits of the `val` argument are equal to zero, but don't check it.
This patch adds a new version of that function which does have the check
and then calls a new function `FLAC__bitwriter_write_raw_uint32_nocheck()`
which behaves like the old one.
Code updated to use these two functions as needed.
Patch-from: lvqcl <lvqcl.mail@gmail.com>
- Retire 32bit variant of silog2(), since only the _wide variant is used
- Rename FLAC__bitmath_silog2_wide() to FLAC__bitmath_silog2()
- Replace existing implementation by shorter, clearer implementation
using optimised routines from bitmath.h
- Update Copyright string to 2016 in changed files
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
Closes: https://github.com/xiph/flac/pull/6
* Drop support from MSVC earlier than 2005.
* Make types of FLAC__clz_uint32() and FLAC__clz_soft_uint32() the same.
* Remove un-needed parens.
* Cleanup FLAC__bitmath_ilog2_wide().
Patch-from: lvqcl <lvqcl.mail@gmail.com>
Windows can suffer quite badly from disk fragmentations. To avoid
this, on Windows, the FILE* buffer size was set to 10Meg. However,
this huge buffer is undesireable when writing to a eg a pipe.
This patch updates the behaviour to only use the huge buffer when
writing to disk.
Patch-from: lvqcl <lvqcl.mail@gmail.com>
Closes: https://sourceforge.net/p/flac/feature-requests/114/
lvqvl found that 32-bit total_error_* variables can overflow when the
right encoding parameters are used. This patch disables them.
Patch-from: lvqcl <lvqcl.mail@gmail.com>