summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Fix nasm.h not found when building in x86Chocobo12021-06-221-1/+1
| | | | | | | | | | | | The following is the error from compiler: Assembling cpu_asm.nasm cmd.exe /D /C "C:\Users\appveyor\AppData\Local\Temp\1\tmp62cb769c16c04b79a2f73246c8ccf95a.cmd" "/NASM/nasm.exe" -o "FLAC-asm.dir\Release\cpu_asm.obj" -fwin32 -I"C:\project\lib\flac\include\\" -I"C:\project\lib\flac\_build\Win32\\" -D"CMAKE_INTDIR="Release"" -dOBJ_FORMAT_win32 "C:\project\lib\flac\src\libFLAC\ia32\cpu_asm.nasm" C:\project\lib\flac\src\libFLAC\ia32\cpu_asm.nasm:34: fatal: unable to open include file `nasm.h' Closes #220. Signed-off-by: Ozkan Sezer <sezeroz@gmail.com>
* Fix encoding of contributor name.Max Zettlmeißl2021-06-225-5/+5
| | | | The name of Håvard Kvålen was wrongly encoded.
* 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.
* Add some overflow checks for residual bits calculationMartijn van Beurden2021-03-151-8/+15
|
* 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.
* libFLAC/stream_decoder.c: Fix divide by zero error in ↵Neelkamal Semwal2021-03-151-2/+4
| | | | FLAC__stream_decoder_seek_absolute
* libFLAC/stream_decoder.c: Use current position as bound when seekingRobert Kausch2021-03-151-3/+14
|
* CMake polishingevpobr2020-05-142-14/+14
| | | | | | | | | | | | | | * Improve CPU features detection CMAKE_SYSTEM_PROCESSOR is pretty useless (e.g. when compiling with MSVC ARM64 toolchain and Ninja still returns system processor). * Don't build src/utils targets by default Fix compilation for UWP platform. * Add more Visual studio Git ignore patterns * Autogenerate Doxygen docs
* Simplified logic of parsing sizes of rice-partitionsUlrik Mikaelsson2020-05-031-3/+3
| | | | | | | | | | | | > if the partition order is zero, n = frame's blocksize - predictor order > else if this is not the first partition of the subframe, > n = (frame's blocksize / (2^partition order)) > else n = (frame's blocksize / (2^partition order)) - predictor order if the partition order is zero, then partition_number can only be zero if the partition order is zero, then (frame's blocksize / (2^partition order)) is (frame's blocksize / 1) == frame's blocksize
* fix build under Mac OS X with PowerPC CPUThomas BERNARD2020-05-031-5/+12
| | | | | revert 44036c9a9b45d03373fe90e9c112852bfc054c51 because auxv.h is only available under Linux and FreeBSD.
* Bunch of CMake fixesevpobr2020-05-0316-41/+46
| | | | | | | | | | | | * 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
* cmake: Fix pkg-config install pathevpobr2020-04-072-2/+2
| | | | | | Path was accidentally broken in acadefd. Closes #200.
* Add more CMake optionsevpobr2020-04-053-19/+24
| | | | | | | * BUILD_PROGRAMS ** INSTALL_MANPAGES * INSTALL_PKGCONFIG_MODULES * INSTALL_CMAKE_CONFIG_MODULE
* link lm publicly to FLACericLemanissier2020-03-061-1/+1
|
* Fix nullptr dereference in FLAC++Tamás Zahola2019-12-271-0/+3
|
* CMake: Handier way to find IconvVitaliy Kirsanov2019-12-225-21/+15
|
* Correct printf specifiers to unsigned int where neededAndrey Astafyev2019-12-094-9/+9
|
* flac: Input file name size calculated just one timeAndrey Astafyev2019-12-081-10/+14
|
* replaygain: Fixed usage of gainfilter variable after freeAndrey Astafyev2019-12-081-3/+6
|
* flac: Remove variable from expression because it's always equals to falseAndrey Astafyev2019-12-081-1/+1
|
* libFLAC: Removed useless comparisonAndrey Astafyev2019-12-081-1/+1
|
* libFLAC++: Fix mistyped identifier nameAndrey Astafyev2019-12-081-1/+1
|
* libFLAC++: Delete decoder and encoder before return if they're not validAndrey Astafyev2019-12-082-0/+4
|
* Both files are checked for EOFAndrey Astafyev2019-11-301-1/+1
|
* libFLAC/bitreader.c: Fix shift invoking undefined behaviourErik de Castro Lopo2019-11-241-2/+3
| | | | | | Credit: Oss-Fuzz Issue: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=19067 Testcase: fuzzer_decoder-5725157960450048
* libFLAC/bitreader.c: Fix shift invoking undefined behaviourErik de Castro Lopo2019-11-221-2/+3
| | | | | | Credit: Oss-Fuzz Issue: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=19036 Testcase: fuzzer_decoder-5679084202098688
* libFLAC/bitreader.c: Fix shift invoking undefined behaviourErik de Castro Lopo2019-11-191-3/+4
| | | | | | Credit: Oss-Fuzz Issue: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=18535 Testcase: fuzzer_decoder-6573800707063808
* cmake: use proper pkg-config install path variableDeadSix272019-11-182-2/+2
|
* libFLAC++: Add libFLAC++-static.la target for oss-fuzzersErik de Castro Lopo2019-11-181-4/+9
|
* cmake_minimum_required() cleanup:sezero2019-11-153-7/+0
| | | | | | | | | | - document version requirements in the top-level file. - remove incorrect version requirements from sub-dirs. - set min. required version to 3.5 in top-level file. - set minimun required version to 3.9 under docs/ . - make documents building an option (on by default.) so, the tree can be built using cmake-3.5 using -DBUILD_DOCS=0 on the command line.
* 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.
* libFLAC/bitreader.c: Fix shift invoking undefined behaviourErik de Castro Lopo2019-11-111-1/+1
| | | | | | Credit: Oss-Fuzz Issue: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=18589 Testcase: fuzzer_decoder-5668806471188480
* test_streams: Fix UBSAN error in random generatorErik de Castro Lopo2019-11-111-2/+2
|
* libFLAC/stream_decoder.c: fix integer overflow on corrupt fileHakan Kvist2019-10-241-0/+2
| | | | Corrupt metadata could make the length calculation overflow.
* Fix msvc build after commit b917d456sezero2019-10-191-1/+0
| | | | Closes: https://github.com/xiph/flac/issues/152
* Replace unsigned with uint32_t in prototypes; Fixes DJGPP builds.NY001232019-10-193-3/+3
|
* cmake: fix nasm sources build when building in a separate directorysezero2019-10-101-2/+3
| | | | | | | | | | When building in the same directory as the source, it works, but not in a separate directory. The trailing slash is important with nasm. Note that include_directories("${CMAKE_CURRENT_SOURCE_DIR}/") does not work because cmake seems to strip the trailing slash. Also relax the cmake version requirement from 3.12 to 3.9 as everywhere else in the tree: it works just fine.
* cmake: do not add visibility attributes to shared lib builds for win32.sezero2019-10-102-4/+21
|
* make dllexport work with compilers other than MSVCsezero2019-10-101-8/+11
| | | | | | | | the issue is, flac and metaflac exes rely on flac_internal_???_utf8() procedures from windows_unicode_filenames.c and there is no easy way to exclude them from exports without breaking things. So export them explicitly (they are exported anyway w/o this patch), but add a FIXME note about the kludge in windows_unicode_filenames.c.
* move the new public get_decoder_client_data function to public header.sezero2019-10-101-5/+0
|
* libFLAC/bitreader.c: Fix out-of-bounds readErik de Castro Lopo2019-10-081-1/+1
| | | | | | Credit: Oss-Fuzz Issue: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=17069 Testcase: fuzzer_decoder-5670265022840832
* Make sure CMake build files end up in release tarballErik de Castro Lopo2019-10-0120-0/+28
|
* libFLAC/lpc.c: Fix signed integer overflowErik de Castro Lopo2019-09-161-12/+12
| | | | | | | | Do the addition as 64 bits before truncating to 32 bits. Credit: Oss-Fuzz Issue: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=16459 Testcase: fuzzer_decoder-5728784602365952
* libFLAC/bitreader.c: Fix shift invoking undefined behaviourErik de Castro Lopo2019-09-161-2/+4
| | | | | | Credit: Oss-Fuzz Issue: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=16464 Testcase: fuzzer_decoder-5663276452544512
* libFLAC/bitreader.c: Fix shift invoking undefined behaviourErik de Castro Lopo2019-09-161-1/+1
| | | | | | Credit: Oss-Fuzz Issue: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=16458 Testcase: fuzzer_decoder-5649174900506624
* libFLAC/bitreader.c: Fix OOB readErik de Castro Lopo2019-09-161-5/+8
| | | | | | Credit: OSS-Fuzz Issue: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=16457 Testcase: fuzzer_decoder-5076189185572864
* Fix a number of gcc 9.2 compiler warningsErik de Castro Lopo2019-09-156-19/+21
|
* Run libFLAC++ through clang-tidy.Rosen Penev2019-09-153-165/+164
| | | | | | | | | Applied the following suggestions: modernize-deprecated-headers google-readability-casting google-readability-namespace-comments readability-else-after-return
* window: fabs > fabsf and cos > cosf where it makes senseRosen Penev2019-09-151-16/+16
| | | | The f functions are faster. It seems the arguments are all floats.