Commit Graph

4474 Commits

Author SHA1 Message Date
Martijn van Beurden e42f723b12
Remove debug messages (#741)
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.
2024-09-12 19:04:48 +02:00
Martijn van Beurden d34489c478
Fix overflow when skipping over raw input (#737)
Fixes https://github.com/xiph/flac/issues/655
2024-08-31 20:56:10 +02:00
Martijn van Beurden 4a271d2e9f Add note to metaflac warning about writing to symlinks 2024-08-30 21:02:09 +02:00
Martijn van Beurden 685f4f69d1 Let libFLAC handle symlinks on metadata handling
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)
2024-08-30 21:02:09 +02:00
Martijn van Beurden 348b3a449f
Check for ID3v1 tags (#738) 2024-08-30 11:10:08 +02:00
Martijn van Beurden e2aef0c275
Remove microbench (#736)
This commit removes 'microbench', as it is no longer relevant. For
more information on its former purpose, see
https://lists.xiph.org/pipermail/flac-dev/2015-September/005608.html
2024-08-30 07:33:55 +02:00
Martijn van Beurden b573a36ed8 Polish previous commit: add failure messages and fix memory leaks 2024-08-27 16:34:15 +02:00
Miroslav Lichvar 0adaa03498 Check return code of static_metadata_append()
Fix crash due to ignored memory allocation error in
static_metadata_append().
2024-08-27 16:34:15 +02:00
Martijn van Beurden 4469640b95 Allow alloccheck to keep failing 2024-08-27 16:34:15 +02:00
Jesper Larsson 1880f21066 don't just pass 0 for samples in Ogg/FLAC callback
This is a fix for https://github.com/xiph/flac/issues/661
2024-08-27 08:49:31 +02:00
Martijn van Beurden 8e6498d44d
Improve console output of flac tool (#734)
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
2024-08-21 15:56:58 +02:00
Martijn van Beurden 192bf227ae
Remove --explain option from flac command line program (#721)
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
2024-07-30 20:41:18 +02:00
Martijn van Beurden ce91056644 Work around i386 ASAN fseek bug
For some reason, i386 ASAN's fseek does not have large file
support, and off_t is actually a 32-bit int
2024-07-25 18:01:02 +02:00
Martijn van Beurden e50c876a1c Do not try to apply replaygain when bps changes
Credit: Oss-Fuzz
Issue: N/A
2024-07-25 18:01:02 +02:00
Martijn van Beurden 33b9a4a765 Work around i386 ASAN null pointer bug
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
2024-07-25 18:01:02 +02:00
Martijn van Beurden 215d1aa633 Do not try to apply replaygain when bps < 4 or bps > 24 2024-07-23 16:45:53 +02:00
Martijn van Beurden defad5b544 Turn replaygain application off when impossible
Addition to commit 808efb3. That commit threw a warning, but did
not actually turn off replaygain application.

Credit: Oss-Fuzz
Issue: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=70482
2024-07-23 16:45:53 +02:00
Martijn van Beurden 8c244b8389 Add level 0 Ogg reading capability to tests and docs 2024-07-18 08:16:39 +02:00
Martijn van Beurden f94d34ffba Enable MD5 checking of input when reencoding to stdout 2024-07-18 08:16:39 +02:00
Martijn van Beurden 3adb645559 Enable level 0 metadata interface to read Ogg files too 2024-07-18 08:16:39 +02:00
Martijn van Beurden a9306bb390 Check that MD5 sums are the same when re-encoding FLAC file 2024-07-18 08:16:39 +02:00
Martijn van Beurden ef35c28dfd
Fix printing of usage_error (#727)
This was missed in commit dda3e77
2024-07-16 11:24:12 +02:00
Martijn van Beurden 3468459d44
Fix endless loop in foreign metadata handling (#725)
Credit: Oss-Fuzz
Issue: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=58545
2024-07-14 19:48:41 +02:00
Martijn van Beurden d48b689ae8 Enable fuzzing of writing foreign metadata back on decoding
The output file was deleted before writing back foreign metadata
could take place, making that code always fail and not covered by
fuzzing
2024-07-12 13:03:46 +02:00
Martijn van Beurden 51e61ae99e Fix mistake in fuzzing seed corpus
The seed corpus had a file that was supposed to cover replaygain
synthesis, but didn't have any replaygain tags. Because of the
fixed format of these tags, they aren't reasonbly reachable by
fuzzing without help
2024-07-12 13:03:46 +02:00
Martijn van Beurden de8bbb0d5b
Update copyright to 2024 (#722) 2024-07-11 15:35:32 +02:00
Martijn van Beurden 15ea6ef822
Fix analyze mode trying to get positions from stdin (#720)
Credit: Oss-Fuzz
Issue: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=68539
2024-07-11 07:24:01 +02:00
Martijn van Beurden 9977773a60 Address two Clang warnings 2024-07-10 19:38:09 +02:00
Martijn van Beurden 09d7887b2f Remove unnecessary assert condition
Credit: Oss-Fuzz
Issue: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=60777
2024-07-10 19:38:09 +02:00
Martijn van Beurden e14acb96c1
More Pandoc HTML fixes (#717)
- Make html manpages build with old pandoc versions
- Add building of html docs to CMake
2024-07-04 21:45:55 +02:00
Martijn van Beurden b6b5b3259f
Make UTF-8 decoder more restrictive (#712)
Fixes https://github.com/xiph/flac/issues/706
2024-07-03 09:10:30 +02:00
Martijn van Beurden b773157a59 Update 'distcheck' github action to Ubuntu 24.04 2024-06-27 08:33:31 +02:00
Martijn van Beurden 97d8cd19ce Add building of a tarball to github actions 2024-06-27 08:33:31 +02:00
Martijn van Beurden 9b945dcb90 Build HTML docs: manpage readers are very uncommon on Windows 2024-06-27 08:33:31 +02:00
H2Swine 9dd697bb8d
Improve flac executable built-in help text (#708)
Co-authored-by: Martijn van Beurden <mvanb1@gmail.com>
2024-06-26 13:03:00 +02:00
Martijn van Beurden dda3e77ea2
On WIN32, set stdout/stderr to UTF-8 (#714)
When stderr (flac) or stdout (metaflac) is redirected to a file,
output of non-ASCII characters fails. This commit should fix that.

Fixes https://github.com/xiph/flac/issues/713

NOTE: To enable this change, metaflac no longer outputs
application block data as binary directly, because that would
potentially result in incorrect UTF-8 codepoint. Instead, all
bytes that cannot be represented as printable ASCII are
replaced with the Unicode replacement character
2024-06-26 09:42:07 +02:00
Martijn van Beurden 706c061457
Fix https://github.com/m-ab-s/media-autobuild_suite/issues/2718 (#711) 2024-06-19 15:22:26 +02:00
Sam James ef1e185e2c
test: stop using which (#709)
`which` is an external command which isn't required by POSIX.

Debian and other distributions (like Gentoo!) are looking
to drop it from their base set of packages.

Switch to `command -v` which is, however, POSIX. See https://lwn.net/Articles/874049/.
2024-06-19 11:36:29 +02:00
Martijn van Beurden 1c5803950e
Do not warn that multithreading is disabled when setting 1 thread (#710) 2024-06-19 08:42:08 +02:00
Steve Lhomme a0f6661beb
export -lssp for static libraries (#704)
.a files in MinGW don't list the other static libraries they depend on.
We need to provide it through the pkg-config file.
2024-06-13 12:03:30 +02:00
Martijn van Beurden d6204ea911 Enable CMake install of api docs from tarball w/o doxygen 2024-06-07 09:18:06 +02:00
Jevin Sweval d21202e3f2 Fix CMake Doxygen install (match Makefile builds) 2024-06-07 09:18:06 +02:00
Kevin Groeneveld 7acdaabe2b Fix fallback to frame header bps.
Commit d4daa86167 ("Check for bps% 8 != 0 if no streaminfo is present")
breaks fallback to frame header bps as it tests decoder_session->bps at
a point where it is guaranteed to be 0 as this is the else case of the
if(decoder_session->bps) block.

Some corrupted FLAC files that used to play before the above mentioned
commit no longer can be played.

Move decoder_session->bps = bps to before the decoder_session->bps
validation to restore functionality more similar to before.
2024-06-06 14:50:27 +02:00
Martijn van Beurden cfe3afca9b
Further improve calculation of when to use wide residual computation (#702) 2024-05-16 16:00:19 +02:00
Martijn van Beurden 1ab3c8e748
Improve calculation of when to use wide residual computation (#700) 2024-05-15 10:42:58 +02:00
Martijn van Beurden 04532802fd
Escape double dashes, so they don't get converted to em dashes (#698)
Fixes https://github.com/xiph/flac/issues/671
2024-05-02 15:54:54 +02:00
Martijn van Beurden f5012d5e88 Update iconv.m4 2024-05-02 08:30:27 +02:00
Martijn van Beurden d6921ed6cd Fix use of --enable-asm-optimizations
Fixes https://github.com/xiph/flac/issues/686
2024-05-02 08:30:27 +02:00
Martijn van Beurden de80349297
Fix bug in CHECK_ORDER_IS_VALID macro in functions with intrinsics (#696)
This fixes a few things I missed with https://github.com/xiph/flac/pull/694
2024-05-01 17:03:19 +02:00
Martijn van Beurden 653b1187a1
Update GNU Free Documentation License (#697) 2024-05-01 12:11:18 +02:00