Commit Graph

605 Commits

Author SHA1 Message Date
Martijn van Beurden
17811b3af6
Add FLAC__stream_decoder_find_total_samples (#758) 2024-11-13 09:21:37 +01:00
Martijn van Beurden
73b55024d0 Enable libFLAC to write to new file on changing metadata
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.
2024-10-28 12:09:10 +01:00
Martijn van Beurden
b8efde2132
Add two error statuses to the stream decoder for broken files (#744) 2024-09-29 20:17:01 +02:00
Martijn van Beurden
d367d6fe92 Bump library version numbers and update ABI dumps 2024-09-27 15:24:19 +02:00
Martijn van Beurden
4234fa772b Add FLAC__stream_decoder_skip_single_link and use in seeking
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
2024-09-27 15:24:19 +02:00
Martijn van Beurden
c50e4872a6 Add capability to libFLAC to seek in chained streams 2024-09-27 15:24:19 +02:00
Martijn van Beurden
f02c6dbfae Add tests for decoding of chained streams 2024-09-27 15:24:19 +02:00
Martijn van Beurden
60e9234c6f Overhaul decoding of chained streams in libFLAC 2024-09-27 15:24:19 +02:00
philippe44
64e3e6e6f0 Add functions to decode chained stream to API
Co-authored-by: Martijn van Beurden <mvanb1@gmail.com>
2024-09-27 15:24:19 +02:00
ziplantil
9dd1b0a6a1
use ogg_page_granulepos to get number of samples written for Ogg FLAC (#743)
Co-authored-by: Martijn van Beurden <mvanb1@gmail.com>
2024-09-26 08:34:04 +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
8c244b8389 Add level 0 Ogg reading capability to tests and docs 2024-07-18 08:16:39 +02:00
Martijn van Beurden
de8bbb0d5b
Update copyright to 2024 (#722) 2024-07-11 15:35:32 +02:00
Martijn van Beurden
9977773a60 Address two Clang warnings 2024-07-10 19:38:09 +02:00
Steve Lhomme
9977bb5b77 include/share/compat.h : use fseek if fseeko is not available 2024-04-22 14:37:41 +02:00
Martijn van Beurden
8cf7e7fbb5 Update API version numbers and ABI dumps 2023-09-22 21:10:15 +02:00
Martijn van Beurden
c227be6c12 Add multithreading to libFLAC++ and more fuzzers 2023-09-22 21:10:15 +02:00
Martijn van Beurden
d2f0a1a812 Add multithreading to API documentation and man page 2023-09-22 21:10:15 +02:00
Martijn van Beurden
acf6f8ff11 Add multithreading to libFLAC 2023-09-22 21:10:15 +02:00
Martijn van Beurden
d80e574451
Explain use of errno with callbacks 2023-06-16 06:46:57 +02:00
Martijn van Beurden
e00d9b881f
Update copyright year and maintainer status 2023-06-06 22:08:24 +02:00
Martijn van Beurden
fd890034a5
Fix compression level 8 in API docs 2023-06-01 19:16:03 +02:00
Martijn van Beurden
1619af5a36
Update changelog and library version numbers 2023-05-30 07:41:35 +02:00
Martijn van Beurden
22fffdceb8 Check for overflow when multiplying skip samples with sample size
Credit: Oss-Fuzz
Issue: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=58606
2023-05-08 19:39:08 +02:00
Martijn van Beurden
00cb41ee03 Add use of x86 BMI2 to bitreader_read_rice_signed_block 2023-03-27 22:10:00 +02:00
Martijn van Beurden
b11677e052 Add API function FLAC__metadata_object_set_raw
Add an API function to directly input binary FLAC data to get a
FLAC__StreamMetadata struct. The use mirrors
FLAC__metadata_object_get_raw
2023-03-19 22:37:40 +01:00
Martijn van Beurden
b54eabdf0d Add API function FLAC__metadata_object_get_raw
Add an API function to directly output binary FLAC data corresponding
to a certain FLAC__StreamMetadata struct
2023-03-19 22:37:40 +01:00
Martijn van Beurden
8daf62da0c Rename fuzzer source files to simplify oss-fuzz build script 2023-02-21 15:56:40 +01:00
Martijn van Beurden
3baaf23faa
Add warning that md5 functions are used elsewhere 2023-02-21 08:16:46 +01:00
Martijn van Beurden
0a52c6fd5c
Replace own bool with stdbool.h, check for header being available 2023-01-07 09:58:00 +01:00
Martijn van Beurden
a73e70c8f4 Also check asserts in fuzzing 2022-11-09 07:19:31 +01:00
Martijn van Beurden
396313c9d0 [doxygen] Change links from local to xiph.org/flac 2022-10-19 17:09:57 +02:00
Ozkan Sezer
c0a6701bc0 fix a typo in stream_encoder.h
fixes doxygen error:
include/FLAC/stream_encoder.h:1298: Error: Unexpected character `"'
2022-10-19 17:09:57 +02:00
Martijn van Beurden
3f4ba7620c Change C++ style comments to C style in headers 2022-09-20 19:54:32 +02:00
Martijn van Beurden
87c3d8a0d9 Fix a lot of Doxygen errors and add some documentation 2022-09-20 19:54:32 +02:00
Martijn van Beurden
89a1620c42 Update API and tool docs 2022-09-20 19:54:32 +02:00
Martijn van Beurden
dc12a9e2f6
Add struct tag to FLAC__StreamMetadata (#416) 2022-08-29 20:35:19 +02:00
Martijn van Beurden
fbb6cb5c07 Add OOM checking to fuzzing 2022-08-20 16:03:53 +02:00
Martijn van Beurden
707dace4bd Leave metadata items untouched if resize function fails 2022-08-20 16:03:53 +02:00
Martijn van Beurden
21fe95ee82 Add and use _nofree variants of safe_realloc functions
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.
2022-08-20 16:03:53 +02:00
lutianxiong
b715d7b9fe fix potential memleak 2022-08-20 16:03:53 +02:00
Martijn van Beurden
3022dad831
Fix and warning for MSVC with Windows XP toolset (#399)
A warning and a small workaround is added for building
libFLAC on MSVC with a specific Windows XP targeting toolset.
2022-08-06 20:32:28 +02:00
Martijn van Beurden
05ff569266 Finish porting guide 2022-07-27 22:16:04 +02:00
Martijn van Beurden
42201ae575 Add porting guide stub 2022-07-27 22:16:04 +02:00
Martijn van Beurden
10d7ce268b Bulk update copyright dates to 2022 2022-07-26 16:23:07 +02:00
Martijn van Beurden
67131c04b8 Include stddef.h in compat.h
See https://github.com/xiph/flac/issues/76 for details

Also, move include of stddef.h and stdarg.h up to top of file to
make clear that they are included unconditionally
2022-07-19 17:33:29 +02:00
Martijn van Beurden
633ab36ec5
Small fixes needed for 32-bit capability (#379)
* Change replaygain analysis so it is able to handle 32-bit PCM
* Increase FLAC__REFERENCE_CODEC_MAX_BITS_PER_SAMPLE to 32
* Fix switch-case fallthrough
2022-07-01 07:36:48 +02:00
Martijn van Beurden
9df24ac202 Add 32-bit decoding capability
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
2022-06-12 18:38:21 +02:00
Martijn van Beurden
1bb80c18da Small make distcheck fixes 2022-05-27 21:59:32 +02:00