summaryrefslogtreecommitdiff
path: root/src/flac
Commit message (Collapse)AuthorAgeFilesLines
* Update API and tool docsMartijn van Beurden2022-09-201-6/+6
|
* Warn user when encoding to stdout that checksum isn't written (#445)Martijn van Beurden2022-09-161-0/+7
| | | Fixes https://github.com/xiph/flac/issues/428
* Add and use _nofree variants of safe_realloc functionsMartijn van Beurden2022-08-202-3/+3
| | | | | | | | | | | | | | | | | 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.
* Introduce subdivide_tukey apodizationMartijn van Beurden2022-08-191-6/+6
| | | | | | | | | | | | | | | 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.
* Remove really old --explain text and reflow to fit 80 charsMartijn van Beurden2022-08-101-25/+21
| | | | | 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
* Bulk update copyright dates to 2022Martijn van Beurden2022-07-2616-18/+18
|
* Re-add check for block alignMartijn van Beurden2022-07-161-20/+4
| | | | | | | | 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.
* Improve foreign metadata handlingMartijn van Beurden2022-06-287-36/+119
| | | | | | Add options --keep-foreign-metadata-if-present and improve error messages when on decoding the wrong type of foreign metadata is found.
* Always take compression level as first compression settingMartijn van Beurden2022-06-271-3/+10
| | | | | | | 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
* Do not add channel mask to vorbis_comment that will be reused laterMartijn van Beurden2022-06-242-2/+6
| | | | This fixes https://github.com/xiph/flac/issues/376
* Add 32-bit encoding, including limiting of residual to 32-bit intMartijn van Beurden2022-06-122-4/+45
|
* Add 32-bit decoding capabilityMartijn van Beurden2022-06-122-7/+33
| | | | | | 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
* Remove Makefile.lite build systemMartijn van Beurden2022-05-273-102/+0
|
* Remove all Visual Studio specific build filesMartijn van Beurden2022-05-277-971/+1
|
* Add --limit-min-bitrate to flac and add test for itMartijn van Beurden2022-05-023-0/+15
|
* Enable flac to skip extra STREAMINFO and check number of samplesMartijn van Beurden2022-04-271-0/+19
| | | | | | | | | | | | | 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
* Documentation fixes: preset description and subset blocksizesMartijn van Beurden2022-04-261-4/+6
| | | | | | | | 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
* Fix format_mistake printfMartijn van Beurden2022-04-221-1/+1
| | | | | | | 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
* Avoid creating a new variable in md5 gcc workaroundTill Schäfer2022-04-191-2/+1
| | | | https://sourceforge.net/p/flac/bugs/478/
* Fix size of first frame when using analyze functionMartijn van Beurden2022-04-171-2/+4
| | | | | | | | 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
* [CMake] Create prettier MSVC solution filesMartijn van Beurden2022-04-131-0/+1
|
* Change sourceforge URL in flac error messages to githubMartijn van Beurden2022-02-132-2/+2
| | | | Signed-off-by: Ralph Giles <giles@thaumas.net>
* Fix compression ratio display for very small filesMartijn van Beurden2021-03-151-3/+3
| | | | | | | | 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.
* Change analyse function to support >4Gbit framesMartijn van Beurden2021-03-153-5/+5
| | | | | | | | 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.
* flac: Work around gcc bug to prevent false unset MD5 signature warningNotTsunami2021-03-151-1/+2
| | | | | | | | | | | | | | | | | | | | | | 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.
* Bunch of CMake fixesevpobr2020-05-031-4/+3
| | | | | | | | | | | | * 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: Input file name size calculated just one timeAndrey Astafyev2019-12-081-10/+14
|
* flac: Remove variable from expression because it's always equals to falseAndrey Astafyev2019-12-081-1/+1
|
* flac/main.c: replace an snprintf() call with flac_snprintf()sezero2019-11-111-1/+1
| | | | | | 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.
* Replace unsigned with uint32_t in prototypes; Fixes DJGPP builds.NY001232019-10-193-3/+3
|
* Make sure CMake build files end up in release tarballErik de Castro Lopo2019-10-011-0/+1
|
* Fix a number of gcc 9.2 compiler warningsErik de Castro Lopo2019-09-151-3/+2
|
* flac/utils: Add missing defineRosen Penev2019-09-151-0/+3
| | | | wcswidth needs _XOPEN_SOURCE defined. Otherwise, no declaration.
* Fix Visual Studio solution generation with CMakeevpobr2019-05-121-4/+5
| | | | | | Rename flac application target to flacapp to avoid name collision with FLAC library target. Closes #101.
* Use of BUILD_SHARED_LIBS addedVitaliy Kirsanov2019-05-041-1/+1
|
* Fixed dependencies on win_utf8_ioВиталий Кирсанов2019-05-041-0/+3
|
* Fixed dependency between grabbag and utf8Vitaliy Kirsanov2019-05-041-1/+0
|
* CMake minimum required lowered to 3.1Vitaly Kirsanov2019-05-041-6/+0
|
* CMake support addedVitaliy Kirsanov2019-05-041-0/+27
|
* Suppress compression failure message if it is not an errorKarthik Periagaram2019-02-011-3/+2
| | | | | | | 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).
* Move CreateFile_utf8 function to a more logical placelvqcl2018-08-251-2/+2
|
* move CreateFile function outside of libFLAClvqcl2018-08-191-4/+4
|
* Fix --output-prefix with input-files in sub-directoriesorbea2018-06-111-2/+20
| | | | | | | 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>
* Fix miscellaneous typos.luz.paz2018-05-241-2/+2
| | | | Found via `codespell -q 3`
* flac: Use WAVEFORMATEXTENSIBLE when bps != (8|16)Erik de Castro Lopo2017-05-271-1/+1
| | | | | | | | 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.
* flac: Fix usage messageErik de Castro Lopo2017-04-171-1/+1
| | | | Patch-from: "Michael W. Bombardieri" <mb@ii.net>
* flac/encode.c: Fix an integer overflowErik de Castro Lopo2017-02-141-3/+3
| | | | | | | | | | | | | 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
* stdint.h fixes for MSVS 2005/2008Erik de Castro Lopo2017-01-192-0/+4
| | | | | | | 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>
* When using libtool, use LTLIBICONV instead.David Seifert2017-01-151-1/+1
| | | | | | * This is required, as otherwise -Wl,--as-needed could fail. Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
* Yet more purging of `unsigned` typeErik de Castro Lopo2017-01-157-210/+210
|