summaryrefslogtreecommitdiff
path: root/src/flac/decode.c
Commit message (Collapse)AuthorAgeFilesLines
* Change sourceforge URL in flac error messages to githubMartijn van Beurden2022-02-131-1/+1
| | | | Signed-off-by: Ralph Giles <giles@thaumas.net>
* Change analyse function to support >4Gbit framesMartijn van Beurden2021-03-151-2/+2
| | | | | | | | 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.
* Move CreateFile_utf8 function to a more logical placelvqcl2018-08-251-2/+2
|
* move CreateFile function outside of libFLAClvqcl2018-08-191-4/+4
|
* 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.
* Yet more purging of `unsigned` typeErik de Castro Lopo2017-01-151-35/+35
|
* Bulk update copyright datesErik de Castro Lopo2016-12-051-1/+1
|
* Fix compiler warning from gcc-6.1.1Erik de Castro Lopo2016-09-081-1/+2
|
* flac: Error out if decoding RAW with bits != (8|16|24)Erik de Castro Lopo2015-10-041-0/+6
| | | | | | Suggested by Christopher Key. Closes: https://sourceforge.net/p/flac/patches/43/
* flac/decode.c: Fix undefined behaviourErik de Castro Lopo2015-09-041-1/+1
|
* src/flac/decode.c : Add WAVEFORMATEXTENSIBLE to WAV files as needed.Erik de Castro Lopo2014-12-141-2/+1
| | | | Patch-by: lvqcl <lvqcl.mail@gmail.com>
* Remove traiing whitespace (mostly .c and .h files).Erik de Castro Lopo2014-12-051-2/+2
| | | | Patch-from: lvqcl <lvqcl.mail@gmail.com>
* Update copyright years to include 2014.Erik de Castro Lopo2014-11-251-1/+1
|
* src/flac/decode.c : Decoder buffering improvements on Windows.Erik de Castro Lopo2014-10-031-0/+43
| | | | | | | | On Windows, decoding flac files is also prone to producing fragmented files. Avoid fragmentation on NTFS by using Windows specific functions to tell Windows the size of the file beforehand. Patch-from: Janne Hyvärinen <cse@sci.fi>
* src/ : Remove un-needed MSVC6 workaround.Erik de Castro Lopo2014-07-041-5/+0
| | | | | | | | MSVC6 was not able to cast from a uint64_t to a double and this commit removes some #ifdef hackery designed to work around this problem. Patch-from: lvqcl <lvqcl.mail@gmail.com>
* src/flac/decode.c : Add comment about ubuf union.Erik de Castro Lopo2014-06-301-1/+2
|
* flac: Fix channel order for mono files.Erik de Castro Lopo2014-06-281-1/+1
| | | | | | | | | | | | | | | | | | | | | * The default channel mask for mono files was 0x0001 (front left) but it makes more sense to use 0x0004 (front center) for such files. * Also FLAC will accept not only mono WAV files with 0x0001 mask, but also with 0x0002 (requested at https://sourceforge.net/p/flac/bugs/390/) and 0x0004 (e.g. SoX creates mono files with this mask). * The comment about channel support was updated. * The error message "Use --channel-map=none option to store channels in current order; FLAC files must also be decoded with --channel-map=none to restore correct order." is misleading: FLAC never changes the order of channels. Decoding with this options also sets the channel mask of the resulting WAV file to 0. Without this option the mask is equal to the value of WAVEFORMATEXTENSIBLE_CHANNEL_MASK tag. Patch-from: lvqcl <lvqcl.mail@gmail.com>
* flac: Fix encoder and decode progress messages with --ogg.Erik de Castro Lopo2014-06-281-1/+1
| | | | | | | | | | | | | Problem discussed here: http://lists.xiph.org/pipermail/flac-dev/2014-June/004808.html The values for the interval between two updates (e->stats_mask, e->stats_frames_interval) were set ~10 years ago, and it is small for current CPUs. It was now been increased too (0x3f -> 0xff, etc). The update interval is still less than 1 second. Patch-from: lvqcl <lvqcl.mail@gmail.com>
* Update URLs as nedeed.Erik de Castro Lopo2014-06-281-1/+1
| | | | | | | Sourceforge.net links updated as nedeed with some of them being changed to point to xiph.org/flac. Patch-from: lvqcl <lvqcl.mail@gmail.com>
* src/flac/decode.c : Fix a cast-align warning from GCC.Erik de Castro Lopo2014-06-271-39/+43
| | | | | | | | | The old code was creating an array of FLAC__int8, and then casting that to a set of signed and unsigned 16 and 32 bit integers. This was replaced with a single union containing all the requred array. This solution means that there are fewer pointer casts and actually gives the compiler more information with which to generate fast code.
* src/flac/decode.c : Decode WAVEFORMATEXTENSIBLE_CHANNEL_MASK.Erik de Castro Lopo2014-04-281-1/+1
| | | | | | | When decoding, read the contents of the WAVEFORMATEXTENSIBLE_CHANNEL_MASK tag and write write the channel mask to the WAV file. Patch-from: lvqcl <lvqcl.mail@gmail.com>
* Fix all instances of '#if HAVE_CONFIG_H'.Erik de Castro Lopo2014-03-241-1/+1
| | | | | | Should be '#ifdef HAVE_CONFIG_H'. Closes: https://sourceforge.net/p/flac/bugs/410/
* Set version to 1.3.0 and update coyprights throughout.Erik de Castro Lopo2013-05-261-1/+2
|
* Fix -Wshadow warnings when compiling with mingw-gcc.Erik de Castro Lopo2013-04-211-24/+26
|
* A set of windows utf8 patches fromJanne Hyvärinen <cse@sci.fi>.Erik de Castro Lopo2013-04-211-14/+17
|
* Another windows utf8 I/O patch from Janne Hyvärinen <cse@sci.fi>.Erik de Castro Lopo2013-04-021-2/+2
|
* Huge Windows utf8 I/O patch.Erik de Castro Lopo2013-03-291-3/+3
| | | | Patch from Janne Hyvärinen <cse@sci.fi>.
* Wave64 patch from Janne Hyvrinen <cse@sci.fi>.Erik de Castro Lopo2013-03-171-4/+4
| | | | GUID had one word incorrectly in little endian order.
* Fix a couple of Windows 2Gig file size issues.Erik de Castro Lopo2013-03-141-1/+1
| | | | Patch submitted by Janne Hyvärinen <cse@sci.fi>.
* src/flac/decode.c : Remove repeated code block.Erik de Castro Lopo2013-03-021-6/+0
|
* Add appropriate WAV channel masks for 7 and 8 channel files.Erik de Castro Lopo2013-03-021-0/+12
| | | | | | | | | | | This commit accepts the new default channel masks for 6.1 and 7.1 surround input WAV files, and writes the corresponding masks when decoding to WAV without a channel mask from the metadata block. The local copy of the format spec is also updated with the new text from the flac-website repository. Patch from Ralph Giles <giles@mozilla.com>
* Hoist a repeated conditional in the channel mapping code.Ralph Giles2013-01-181-15/+9
| | | | | | This is equivalent and just makes the code shorter. Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
* Update FSF address.Miroslav Lichvar2012-12-061-3/+3
|
* Fix misuse of \r (potentially) in flac -d or -t output.Erik de Castro Lopo2012-02-121-1/+8
| | | | | Patch from Joshua Kwan <joshk@triplehelix.org> via Debian. Closes Debian bug #138828.
* Add file include/share/compat.h and start moving CPP hackery into it.Erik de Castro Lopo2012-02-041-17/+1
|
* Patch from JonY to suppress redefinition warnings with mingw-w64 lfs64 warnings.Erik de Castro Lopo2012-02-041-0/+4
|
* add 2009 copyrightJosh Coalson2009-01-071-1/+1
|
* Improved error message when user attempts to decode a non-FLAC file ↵Josh Coalson2009-01-071-3/+20
| | | | (SF#2222789: https://sourceforge.net/tracker2/?func=detail&aid=2222789&group_id=13478&atid=113478
* fix handling of aiff ssnd offset; do not try and recreate offset or block ↵Josh Coalson2008-09-131-17/+6
| | | | align when writing aiff
* add support for Wave64 (SF#1769582: ↵Josh Coalson2008-09-091-51/+133
| | | | https://sourceforge.net/tracker/index.php?func=detail&aid=1769582&group_id=13478&atid=113478)
* add support for RF64Josh Coalson2008-09-091-139/+122
|
* update copyright for 2008Josh Coalson2008-02-281-1/+1
|
* fixed bug compiling flac without ogg support (SF#1760786: ↵Josh Coalson2007-09-101-2/+2
| | | | http://sourceforge.net/tracker/index.php?func=detail&aid=1760786&group_id=13478&atid
* finish foreign metadata implemetationJosh Coalson2007-08-211-52/+173
|
* initial support for new --keep-foreign-metadata options, saving done, ↵Josh Coalson2007-08-141-9/+40
| | | | restoring TODO
* add more things reported in analyze modeJosh Coalson2007-06-161-1/+1
|
* special version of sample formatting for common casesJosh Coalson2007-03-221-18/+60
|
* add --warnings-as-errors option to flac; for picture importing, allow MIME ↵Josh Coalson2007-02-061-2/+16
| | | | type in specification to be blank and filled in automatically; allow specification to be just the filename, with other fields filled in automatically
* add 2007 copyrightJosh Coalson2007-02-021-1/+1
|