Commit Graph

30 Commits

Author SHA1 Message Date
Fabian Greffrath
2ccb23fe72 sfe_copy_data_fp: check value of "max" variable for being normal
and check elements of the data[] array for being finite.

Both checks use functions provided by the <math.h> header as declared
by the C99 standard.

Fixes #317
CVE-2017-14245
CVE-2017-14246
2020-06-20 18:18:11 +10:00
Erik de Castro Lopo
25824cb914 sndfile-convert: Close input file on output format error 2019-04-22 02:48:50 +10:00
Erik de Castro Lopo
238ee50429 programs/sndfile-convert.c: Add -opus option 2019-02-23 18:30:02 +11:00
Jonathan Wakely
2241075e47 sndfile-convert: Check if conversion failed due to no. of channels
This fixes the problem noted in #43 where attempting to convert a stereo
WAV to SDS gives a misleading error about the codec, when the real problem
is that the output format only supports mono not stereo.

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2018-02-03 16:12:42 +11:00
Erik de Castro Lopo
203096325d programs/sndfile-convert.c: Add -float64 conversion 2017-10-14 20:54:56 +11:00
Lars Palo
bda4eb309c Add cues to sndfile-convert
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2016-04-11 19:55:10 +10:00
Erik de Castro Lopo
b25f7f3bb3 Revert "src/sndfile.c : Make WAV/GSM610 with sample rates other than 8kHz invalid."
Commit was a0be1713b5.

Also revert the related commits:
* e4253e1609
* 77504d6abd
2014-07-03 21:30:52 +10:00
Erik de Castro Lopo
77504d6abd programs/sndfile-convert.c : Improve error message for GSM610.
Suggested-by: Jan Stary <hans@stare.cz>
2014-07-02 19:47:37 +10:00
Erik de Castro Lopo
bbd4512540 programs/sndfile-convert.c : Add warning for some conversions.
Specifically when converting to GSM 6.10 when the input samplerate
is not 8kHz no resampling will be done so when the file is played
it will simply sound like the original input file played at the
new sample rate.

Suggested-by: Jan Stary <hans@stare.cz>
2014-07-01 21:30:12 +10:00
Erik de Castro Lopo
9cae6da0b8 programs/*.c : More exit code fixes.
Patch-from: Jan Stary <hans@stare.cz>
2014-06-25 06:09:58 +10:00
Erik de Castro Lopo
7f08ad877b programs/sndfile-convert.c : Clean up --help output.
Patch-from: Jan Stary <hans@stare.cz>
2014-06-21 19:05:03 +10:00
Erik de Castro Lopo
409d05275f programs/sndfile-convert.c : Add a -normalize command line argument.
Feature request by Tim Blechmann.

Closes : https://github.com/erikd/libsndfile/issues/23
2013-07-02 17:48:50 +10:00
Erik de Castro Lopo
533e45cc08 programs/sndfile-convert.c : Improve error reporting.
Previous error reporting when the destination audio data format
wasn't supported by the container was inadequate.

Closes : https://github.com/erikd/libsndfile/issues/43
2013-06-24 19:47:22 +10:00
Erik de Castro Lopo
ac8a101960 sndfile-convert.c : Add ability to specify endian-ness.
At the request of Jim Gray, allow endian-ness of output file to be
specified on the command line as:

    -endian=(little|big|cpu)

This is done before the call to sf_format_check() and may still
result in an error if the destination format does not support
the specified endian-ness.
2013-06-23 10:24:53 +10:00
Erik de Castro Lopo
d6b77d2db7 programs/sndfile-convert.c : Add support for alac codec. 2012-03-03 23:17:15 +11:00
Erik de Castro Lopo
8508ec5679 More whitespace and cstyle fixes. 2012-01-21 14:24:38 +11:00
Erik de Castro Lopo
9b8d1e0f2f Fix a bunch of compiler warnings with gcc-4.6. 2011-03-28 18:43:05 +11:00
Erik de Castro Lopo
63a49d67ec programs/ : Use Use program_name() where appropriate. Fix build. 2011-03-21 21:17:59 +11:00
Erik de Castro Lopo
f209698448 Update copyright dates. 2011-01-19 21:36:56 +11:00
Erik de Castro Lopo
565e1c0fe1 programs/*.c : Add the libsndfile version to the usage message of all programs. 2010-10-11 20:33:52 +11:00
Erik de Castro Lopo
9797423621 programs/sndfile-convert.c : Fix valgrind warning. 2010-04-09 20:17:49 +10:00
Erik de Castro Lopo
ea62c5083d Merge from -dev. 2009-12-11 05:48:36 +11:00
Erik de Castro Lopo
218024ef7d Move some code from sndfile-convert.c to programs/common.[ch] for reuse. 2009-12-02 20:26:06 +11:00
Erik de Castro Lopo
1f20d00fdd programs/sndfile-convert.c : Allow the program to read from stdin by specifying - on the command line as the input file. 2009-11-16 19:36:43 +11:00
Erik de Castro Lopo
197273486c Merge from -dev branch. 2009-10-18 21:16:32 +11:00
Erik de Castro Lopo
adda2b0117 programs/sndfile-convert.c : Tweaks. 2009-07-29 11:07:04 +10:00
Erik de Castro Lopo
1028c308b2 programs/sndfile-convert.c : Copy channel map data during copy_metadata(). 2009-05-29 17:13:56 +10:00
Erik de Castro Lopo
0f49287a58 programs/sndfile-convert.c : Add 'htk' to the list of convert formats. 2009-02-03 10:49:37 +11:00
Erik de Castro Lopo
6c8026ab54 programs/*.[ch] : Use SF_BROADCAST_INFO_VAR to manipulate larger 'bext' chunks. 2008-10-27 06:28:14 +11:00
Erik de Castro Lopo
50112e2bb7 Move real utility programs from examples/ to new directory programs/ . 2008-10-21 22:49:55 +11:00