| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
| |
Fixes https://github.com/xiph/flac/issues/428
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Subdivide_tukey is intended to replace partial_tukey and
punchout_tukey. It works in rougly the same way, but uses a more
efficient algorithm, recyling more data.
subdivide_tukey has 2 arguments, of which 1 is optional. The
first states the maximum number of parts the signal has to be
split up in, the second is the tukey parameter, divided by the
max num of parts.
subdivide_tukey(3) analyses audio with an unsplit block, with the
block split in 2 and split in 3. Here the default p of 0.5 applies
to the smallest parts, so the unsplit block effectively has a p of
0.5/3. subdivide_tukey(3/2e-1) does the same but with p of 0.2.
|
|
|
|
|
| |
There was some help text in `flac --explain` which hasn't been
correct for about 20 years already. This is removed, the rest of
the text is reflowed to fit 80 chars standard terminal width
|
| |
|
|
|
|
|
|
|
|
| |
In 2003, in commit 94f81b0, a check was added for the block align
field in WAVE. If it contradicts other parts of the header, an error
was raised. This was (probably erroneously) made inactive with #if 0
in commit 13c63e4. This commit reactivates the check and removes the
rest of the inactivated code.
|
|
|
|
|
|
| |
Add options --keep-foreign-metadata-if-present and improve error
messages when on decoding the wrong type of foreign metadata is
found.
|
|
|
|
|
|
|
| |
Without this patch, the order of the arguments matter, with it
it does not: specific compression settings now always override
the more generic compression levels. This fixes issue
https://github.com/xiph/flac/issues/20
|
|
|
|
| |
This fixes https://github.com/xiph/flac/issues/376
|
| |
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit fixed problems with two files mentioned here:
https://hydrogenaud.io/index.php?topic=121478.msg1004022#msg1004022
The first file was truncated and had no MD5. flac didn't warn
about the number of samples not being correct. The second file
had corrupted metadata in which flac detected two STREAMINFO
blocks, triggering quite odd behaviour.
This commit adds checks for the number of samples and skips
a STREAMINFO block if it has already received one
|
|
|
|
|
|
|
|
| |
As described in github issue #236, the description of compression
presets in flac.sgml wasn't updated. Also, the description of which
blocksizes are considered subset has been lagging behind in the
manpages as well as the build-in help of FLAC for years, as this
was changed back in 2007. This commit fixes those issues
|
|
|
|
|
|
|
| |
If on encoding a different format header is detected than is guessed
from file extension, format_mistake in invoked. On merging wave64
support (commit d7f5344), updating the printable names in
format_mistake was missed
|
|
|
|
| |
https://sourceforge.net/p/flac/bugs/478/
|
|
|
|
|
|
|
|
| |
The size of the first frame was displaying including a PADDING
block, as the decoder position wasn't updated after processing
one such block. The location in the code where the decoder
position is updated has been moved, so a PADDING block does not
get included into the size of the first frame anymore
|
| |
|
|
|
|
| |
Signed-off-by: Ralph Giles <giles@thaumas.net>
|
|
|
|
|
|
|
|
| |
Because the compression ratio was calculated before processing
the input of the last frame, it did not include the size of this
last frame. This patch moves the calculation of the compression
ratio after the new input has been processed. Now the compression
ratio on very small files is correctly displayed.
|
|
|
|
|
|
|
|
| |
Theoretically, when a rice parameter of 0, 24-bit samples, fixed
predictor with order 0, no rice escaping and a blocksize of 65536
is chosen, a subframe could be up to 2^24*65536 = 1 terabyte in
size. While this obviously should never happen, the analyse
function should be able to debug such a case.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A bug beginning in gcc version 9.2 causes strings to get incorrectly
stripped when passed directly to memcmp with a zero first byte (1).
This bug causes flac -t to fail on any .flac file with a md5 checksum
beginning in 00. To work around this bug, the FLAC__byte type is used
for an empty md5 sum to prevent a string from being stripped, which
is backwards compatible and avoids compile-time checks. This was
initially reported back in March 2020, but has seen more light since
Ubuntu 19.10 and up ship with gcc 9.2 as the default compiler. A
patch has been merged into the master gcc branch (2), but has not
been included in any versions as of this commit date.
The initial reporter provided a patch in their bug report (3), which
is included in this PR with authorship attributed to the reporter.
(1) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95189
(2) https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=d5803b9876b3d11c93d1a10fabb3fbb1c4a14bd6
(3) https://sourceforge.net/p/flac/bugs/478/
Closes #192.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add more Git ignore patterns
* Fix Ogg dependency handling (closes #203)
* Remove unneeded compiler flag (closes #204)
* Fix Visual Studio DLL build error error C2491:
'flac_internal_rename_utf8': definition of dllimport function not
allowed (closes #205)
* Add alias targets
* Reduce number of CMake files
* Improve CMake intrinsics detection
|
| |
|
| |
|
|
|
|
|
|
| |
flac_snprintf() is used everywhere else in there. that single instance
of plain snprintf() was added in commit 04974d27. fixes flac.exe build
with older msvc versions.
|
| |
|
| |
|
| |
|
|
|
|
| |
wcswidth needs _XOPEN_SOURCE defined. Otherwise, no declaration.
|
|
|
|
|
|
| |
Rename flac application target to flacapp to avoid name collision with FLAC library target.
Closes #101.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
If the user specifies `--no-error-on-compression-fail`, there is no need
to treat compression failure as an error. Hence, the failure message
should be suppressed along with the non-zero exit code (which already
is suppressed).
|
| |
|
| |
|
|
|
|
|
|
|
| |
And make sure to reserve the whole file path when not using --output-prefix.
Fixes https://sourceforge.net/p/flac/bugs/463/
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
|
|
|
|
| |
Found via `codespell -q 3`
|
|
|
|
|
|
|
|
| |
When decoding to WAV, the legacy wFormatTag of WAVE_FORMAT_PCM should
only be used if the bitwidth is 8 or 16. For all other bitwidths,
use WAVEFORMATEXTENSIBLE.
Two of the test programs/scripts also needed updating.
|
|
|
|
| |
Patch-from: "Michael W. Bombardieri" <mb@ii.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When encoding a 24 bit multichannel W64 file on a 32 bit system, a
calculation could overflow resulting in a "got partial sample"
error and early termination of the encoding process.
The fix was to replace the cast to `size_t` (which is only 32 bits
on a 32 bit system) with a cast to `uin64_t`.
Thanks to Janne Hyvärinen for helping to track down the problem.
Closes: https://sourceforge.net/p/flac/bugs/453
|
|
|
|
|
|
|
| |
This adds a new msvc2005_int.h header file which is "force included"
as needed by the MSVS project file.
Patch-from: lvqcl <lvqcl.mail@gmail.com>
|
|
|
|
|
|
| |
* This is required, as otherwise -Wl,--as-needed could fail.
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
|
| |
|