opus-tools.git
43 hours agoSwitch to -fstack-protector-strong from -all master
Mark Harris [Sat, 24 Feb 2018 05:53:50 +0000 (21:53 -0800)]
Switch to -fstack-protector-strong from -all

-fstack-protector-all appears to be overkill; -fstack-protector-strong
still adds checks where they make sense.

43 hours agoAdd GitLab CI
Mark Harris [Thu, 22 Feb 2018 10:05:52 +0000 (02:05 -0800)]
Add GitLab CI

43 hours agoAttempt to make whitespace a bit more consistent
Mark Harris [Sat, 24 Feb 2018 04:57:54 +0000 (20:57 -0800)]
Attempt to make whitespace a bit more consistent

43 hours agoopusenc: Fix some MSVC compiler warnings
Mark Harris [Fri, 23 Feb 2018 11:15:50 +0000 (03:15 -0800)]
opusenc: Fix some MSVC compiler warnings

43 hours agoUse consistent formatting of units
Mark Harris [Thu, 22 Feb 2018 08:38:02 +0000 (00:38 -0800)]
Use consistent formatting of units

3 days agoopusenc: Fix formatting of time stats
Mark Harris [Thu, 22 Feb 2018 08:04:57 +0000 (00:04 -0800)]
opusenc: Fix formatting of time stats

3 days agoUpdate copyright year
Mark Harris [Thu, 22 Feb 2018 06:28:29 +0000 (22:28 -0800)]
Update copyright year

3 days agoopusenc: Improve error reporting
Mark Harris [Thu, 22 Feb 2018 06:05:59 +0000 (22:05 -0800)]
opusenc: Improve error reporting

Check the return code of every libopusenc function and display an
error when appropriate.

2 weeks agoopusdec: Update resampler from speexdsp
Mark Harris [Thu, 8 Feb 2018 05:16:27 +0000 (21:16 -0800)]
opusdec: Update resampler from speexdsp

Fix use of reserved identifiers, eliminate compiler warnings.

2 weeks agoRemove unused Speex header file os_support.h
Mark Harris [Thu, 8 Feb 2018 05:12:06 +0000 (21:12 -0800)]
Remove unused Speex header file os_support.h

2 weeks agoEliminate dependency on Speex os_support.h
Mark Harris [Thu, 8 Feb 2018 05:10:11 +0000 (21:10 -0800)]
Eliminate dependency on Speex os_support.h

2 weeks agoopusenc: Add FLAC pictures using libopusenc
Mark Harris [Tue, 6 Feb 2018 08:02:58 +0000 (00:02 -0800)]
opusenc: Add FLAC pictures using libopusenc

This eliminates the need to do base64 encoding in opusenc, and
ensures that pictures are valid.  Requires a new libopusenc with
ope_comments_add_picture_from_memory().

3 weeks agoopusenc: Set header gain when requested
Mark Harris [Mon, 5 Feb 2018 00:03:52 +0000 (16:03 -0800)]
opusenc: Set header gain when requested

Used by FLAC input.  Requires latest libopusenc from git.

3 weeks agoDon't use reserved identifiers as macro names
Mark Harris [Sun, 4 Feb 2018 04:04:01 +0000 (20:04 -0800)]
Don't use reserved identifiers as macro names

3 weeks agoopusenc: Fix stats and percent progress
Mark Harris [Sun, 4 Feb 2018 02:05:26 +0000 (18:05 -0800)]
opusenc: Fix stats and percent progress

Values were wrong with multi-frame packets or resampling.
Also don't divide by zero, eliminate unused fields.

3 weeks agoUse correct format specifier for 64-bit types
Mark Harris [Fri, 2 Feb 2018 06:23:21 +0000 (22:23 -0800)]
Use correct format specifier for 64-bit types

Correct fprintf format string warnings with libopus 1.3-beta on 64-bit
Linux (long long vs. long).  Also enable format string warnings for
oi_info(), oi_warn(), and oi_error() and correct those warnings as well.

3 weeks agoC preprocessor formatting cleanup
Mark Harris [Fri, 2 Feb 2018 05:28:58 +0000 (21:28 -0800)]
C preprocessor formatting cleanup

7 weeks agoVS2010: Remove old project files test3-appveyor
Mark Harris [Sat, 6 Jan 2018 04:46:40 +0000 (20:46 -0800)]
VS2010: Remove old project files

The VS2010 project files have not been updated and no longer work.
Also, opus, ogg, opusfile, and libopusenc support only VS2015.

7 weeks agoVS2015: remove source files from libs that don't need them
Ricardo Constantino [Fri, 5 Jan 2018 16:15:29 +0000 (16:15 +0000)]
VS2015: remove source files from libs that don't need them

Closes https://github.com/xiph/opus-tools/pull/24
Signed-off-by: Mark Harris <mark.hsj@gmail.com>
7 weeks agoVS2015: add flac support
Ricardo Constantino [Thu, 4 Jan 2018 00:00:41 +0000 (00:00 +0000)]
VS2015: add flac support

Signed-off-by: Mark Harris <mark.hsj@gmail.com>
7 weeks agoVS2015: prepare for new opusfile and libopusenc dependencies
Ricardo Constantino [Tue, 2 Jan 2018 00:53:06 +0000 (00:53 +0000)]
VS2015: prepare for new opusfile and libopusenc dependencies

Signed-off-by: Mark Harris <mark.hsj@gmail.com>
7 weeks agoappveyor: Fix libopusenc artifact file name
Mark Harris [Fri, 5 Jan 2018 08:11:33 +0000 (00:11 -0800)]
appveyor: Fix libopusenc artifact file name

7 weeks agoappveyor: Install opusfile and libopusenc artifacts.
Ralph Giles [Sat, 24 Jun 2017 01:17:00 +0000 (18:17 -0700)]
appveyor: Install opusfile and libopusenc artifacts.

Make these dependent libraries available for the Visual Studio
integration build.

7 weeks agoVS*: Remove deleted files from VS projects
Mark Harris [Wed, 3 Jan 2018 09:30:55 +0000 (01:30 -0800)]
VS*: Remove deleted files from VS projects

7 weeks agoUpdate Makefile.unix
Mark Harris [Wed, 3 Jan 2018 09:21:38 +0000 (01:21 -0800)]
Update Makefile.unix

7 weeks agoopusdec: Update help and man page
Mark Harris [Wed, 3 Jan 2018 08:51:25 +0000 (00:51 -0800)]
opusdec: Update help and man page

7 weeks agoopusdec: Use HAVE_*SOUNDCARD_H consistently
Mark Harris [Wed, 3 Jan 2018 08:33:20 +0000 (00:33 -0800)]
opusdec: Use HAVE_*SOUNDCARD_H consistently

Check whether the macro is defined rather than sometimes checking
its value.

7 weeks agoopusinfo: Fix compiler warning
Mark Harris [Wed, 3 Jan 2018 08:27:34 +0000 (00:27 -0800)]
opusinfo: Fix compiler warning

7 weeks agosave_range: Correctly handle multistream padding
Mark Harris [Tue, 2 Jan 2018 07:12:22 +0000 (23:12 -0800)]
save_range: Correctly handle multistream padding

opus_packet_parse_impl() is updated based on the current Opus code.
Also fixes compiler warnings, including use of uninitialized data
if the packet is invalid.

7 weeks agoUpdate http URLs to https where appropriate
Mark Harris [Tue, 2 Jan 2018 07:24:17 +0000 (23:24 -0800)]
Update http URLs to https where appropriate

7 weeks agoconfigure: Fix non-pkg-config opus include path
Mark Harris [Tue, 2 Jan 2018 06:59:19 +0000 (22:59 -0800)]
configure: Fix non-pkg-config opus include path

If pkg-config is not used, look for opus.h in <prefix>/include/opus
or (using --with-opus=<opuspath>) <opuspath>/include/opus, not
<prefix>/include or <opuspath>/include.  As before the opus include
directory can still be overridden with --with-opus-includes=<path>,
but this should not be needed if the development package is
installed under <prefix> or the --with-opus directory.

7 weeks agoopusenc: Don't save --picture in ENCODER_OPTIONS
Mark Harris [Sun, 31 Dec 2017 01:45:07 +0000 (17:45 -0800)]
opusenc: Don't save --picture in ENCODER_OPTIONS

Saving --picture leaks local file paths. Also don't save options that
relate only to console output or input file handling like --quiet and
--ignorelength.

7 weeks agoopusinfo: Relax JPEG check to allow EXIF metadata
Mark Harris [Fri, 29 Dec 2017 02:37:57 +0000 (18:37 -0800)]
opusinfo: Relax JPEG check to allow EXIF metadata

7 weeks agoopusenc: Convert to use libopusenc
Jean-Marc Valin [Thu, 11 May 2017 02:30:32 +0000 (22:30 -0400)]
opusenc: Convert to use libopusenc

This adds a dependency, but gets rid of a lot of code. The main benefit
is that libopusenc supports delayed decision.

Signed-off-by: Mark Harris <mark.hsj@gmail.com>
7 weeks agoopusdec: Convert to use libopusfile
Timothy B. Terriberry [Sat, 18 Nov 2017 09:58:30 +0000 (01:58 -0800)]
opusdec: Convert to use libopusfile

This adds a dependency, but also a number of features, such as the
 ability read from http[s] sources or downmix output to stereo.
It also allows opusdec to automatically pick a consistent output
 sample rate and channel count for seekable chained files, and
 gives nicer output for METADATA_BLOCK_PICTURE tags (we parse the
 tags and give a summary, instead of dumping a huge BASE64 string).

Unfortunately, we still have to do our own dithering, as this needs
 to be done after resampling, which happens outside of libopusfile,
 but at least we can re-use libopus's soft clipping implementation.

Signed-off-by: Mark Harris <mark.hsj@gmail.com>
7 weeks agotravis: Build libopusenc from source for the linux tests
Ralph Giles [Sat, 24 Jun 2017 00:38:41 +0000 (17:38 -0700)]
travis: Build libopusenc from source for the linux tests

There's no Ubuntu package for libopusenc, so we need
to provide our own binary.

7 weeks agotravis: Add opusfile and libopusenc dependency
Ralph Giles [Mon, 19 Jun 2017 21:03:12 +0000 (14:03 -0700)]
travis: Add opusfile and libopusenc dependency

libopusenc isn't packaged for Ubuntu trusty, so we need to build it.

7 weeks agoUse libtool to allow uninstalled dependencies
Jean-Marc Valin [Wed, 13 Dec 2017 20:03:33 +0000 (12:03 -0800)]
Use libtool to allow uninstalled dependencies

Signed-off-by: Mark Harris <mark.hsj@gmail.com>
7 weeks agoopusenc: Avoid uninitialized data on invalid FLAC
Mark Harris [Sun, 31 Dec 2017 02:50:26 +0000 (18:50 -0800)]
opusenc: Avoid uninitialized data on invalid FLAC

An invalid FLAC input file with no STREAMINFO would cause the
uninitialized value of flac->channels to be used, and most likely
an assertion failure.

7 weeks agoopusenc: Use fseeko64/ftello64 on MinGW/MinGW-W64
Mark Harris [Fri, 29 Dec 2017 02:42:39 +0000 (18:42 -0800)]
opusenc: Use fseeko64/ftello64 on MinGW/MinGW-W64

MinGW-W64 _ftelli64() sometimes reports an incorrect position.
Found and tested by Andrew D'Addesio.

9 months agoappveyor: get opus artifacts from appveyor
Ricardo Constantino [Tue, 21 Feb 2017 22:08:30 +0000 (22:08 +0000)]
appveyor: get opus artifacts from appveyor

Saves a bit of time.

Signed-off-by: Ralph Giles <giles@thaumas.net>
9 months agoappveyor: run a basic test on the compiled binaries
Ricardo Constantino [Tue, 21 Feb 2017 22:10:03 +0000 (22:10 +0000)]
appveyor: run a basic test on the compiled binaries

Pack resulting artifact from opusenc test for debugging.

Signed-off-by: Ralph Giles <giles@thaumas.net>
9 months agoappveyor: pack manuals from jenkins
Ricardo Constantino [Tue, 21 Feb 2017 22:09:49 +0000 (22:09 +0000)]
appveyor: pack manuals from jenkins

Signed-off-by: Ralph Giles <giles@thaumas.net>
9 months agoappveyor: save artifact to constant name
Ricardo Constantino [Fri, 10 Feb 2017 02:11:01 +0000 (02:11 +0000)]
appveyor: save artifact to constant name

So it can be used with a permalink to the latest build.

ex: https://ci.appveyor.com/api/projects/rillian/opus-tools/artifacts/opus-tools.zip?job=Configuration%3A%20Release%3B%20Platform%3A%20x64
This is a permalink to the latest successful build of Release x64.

Signed-off-by: Ralph Giles <giles@thaumas.net>
9 months agoVS2015: remove unneeded and duplicated options
Ricardo Constantino [Tue, 21 Feb 2017 00:22:20 +0000 (00:22 +0000)]
VS2015: remove unneeded and duplicated options

Add additional properties file for opus-tools shared by the three
executables.
Don't compile unneeded files for each project.

Signed-off-by: Ralph Giles <giles@thaumas.net>
9 months agoVS2015: Add opus common.props
Ricardo Constantino [Fri, 17 Feb 2017 15:15:34 +0000 (15:15 +0000)]
VS2015: Add opus common.props

Signed-off-by: Ralph Giles <giles@thaumas.net>
9 months agoMakefile.am: add VS2015 files
Ricardo Constantino [Tue, 21 Feb 2017 22:25:11 +0000 (22:25 +0000)]
Makefile.am: add VS2015 files

Signed-off-by: Ralph Giles <giles@thaumas.net>
9 months agowin32/gitignore: Ignore generated version.h
Ricardo Constantino [Fri, 17 Feb 2017 15:06:32 +0000 (15:06 +0000)]
win32/gitignore: Ignore generated version.h

Signed-off-by: Ralph Giles <giles@thaumas.net>
12 months agoopusenc: Avoid seeking on Windows pipes
Mark Harris [Wed, 22 Feb 2017 02:02:50 +0000 (18:02 -0800)]
opusenc: Avoid seeking on Windows pipes

On Windows, fseek() on pipes may return zero even though it doesn't seek,
so check the file type before trying to seek.  Also, Windows prefers
_fileno() over fileno().

13 months agoupdate_version: Drop --always from git describe v0.1.10
Mark Harris [Sun, 22 Jan 2017 21:02:45 +0000 (13:02 -0800)]
update_version: Drop --always from git describe

The package_version file will be used if there are no tags, which
is better than just the hash that is returned by --always.

13 months agoappveyor: remove version prefix from artifacts
Ricardo Constantino [Sun, 22 Jan 2017 20:44:35 +0000 (20:44 +0000)]
appveyor: remove version prefix from artifacts

Also appveyor.yml configuration file is moved to .appveyor.yml.

Closes https://github.com/xiph/opus-tools/pull/14
Signed-off-by: Mark Harris <mark.hsj@gmail.com>
13 months agoAdd more coverage in travis
Stephen [Sat, 21 Jan 2017 16:28:14 +0000 (08:28 -0800)]
Add more coverage in travis

Closes https://github.com/xiph/opus-tools/pull/12
Signed-off-by: Mark Harris <mark.hsj@gmail.com>
13 months agowin32: use same genversion script as opus
Ricardo Constantino [Sun, 22 Jan 2017 13:06:52 +0000 (13:06 +0000)]
win32: use same genversion script as opus

Like with opus, this generates an unknown version for git archives
(like the ones generated by GitHub). If you need a proper version
either use releases, a proper git repo or craft your own
package_version.

Signed-off-by: Mark Harris <mark.hsj@gmail.com>
13 months agoopusenc: Avoid resampler fractional sample offset
Jean-Marc Valin [Sun, 22 Jan 2017 05:31:12 +0000 (21:31 -0800)]
opusenc: Avoid resampler fractional sample offset

Signed-off-by: Mark Harris <mark.hsj@gmail.com>
13 months agoRemove obsolete ChangeLog
Mark Harris [Sun, 22 Jan 2017 04:44:26 +0000 (20:44 -0800)]
Remove obsolete ChangeLog

13 months agoUpdate copyright year
Mark Harris [Sun, 22 Jan 2017 04:40:15 +0000 (20:40 -0800)]
Update copyright year

13 months agoopusenc: Clean up help
Mark Harris [Thu, 1 Oct 2015 08:58:42 +0000 (01:58 -0700)]
opusenc: Clean up help

Clearly indicate which options require a parameter and its usual
format.  Use imperative verb form consistently.  Minor rearrangement
to improve logical ordering.  Move diagnostic options to the end.
Move verbose --picture details to --help-picture so that basic usage
information has a chance of fitting on one screen.  Change use of
obsolete term "MIME type" to "media type".  Update man page to match.

13 months agoopusenc: Fix typos
Mark Harris [Thu, 1 Oct 2015 08:57:20 +0000 (01:57 -0700)]
opusenc: Fix typos

13 months agoopusenc: Don't read excess data after samples
Mark Harris [Thu, 1 Oct 2015 08:55:33 +0000 (01:55 -0700)]
opusenc: Don't read excess data after samples

When reading WAV/AIFF data with a known length, don't try to read
(and then discard) data beyond that length, to avoid blocking or
adding unnecessary latency when the data is not from a file.

13 months agoopusenc: Limit end trimming to one frame
Mark Harris [Thu, 1 Oct 2015 08:49:28 +0000 (01:49 -0700)]
opusenc: Limit end trimming to one frame

Avoid writing a final packet larger than 20ms that is larger than
necessary, with 20ms or more that is beyond the end of the stream.

13 months agoopusenc: Change fatal WAV/AIFF warnings to errors
Mark Harris [Thu, 1 Oct 2015 08:48:19 +0000 (01:48 -0700)]
opusenc: Change fatal WAV/AIFF warnings to errors

13 months agoopusenc: Don't warn about mono center channel WAV
Mark Harris [Thu, 1 Oct 2015 08:51:00 +0000 (01:51 -0700)]
opusenc: Don't warn about mono center channel WAV

Even if it has only one channel, an input WAV file can contain a
channel mask. A warning is issued if it is present but not a
supported value. Don't warn about the previously accepted mask
of 1 (FL), or 4 (FC).  Arguably a channel mask of 1 (FL) should
trigger the warning, just as 2 (FR) does, but some tools (including
old opusdec when decoding to floating point WAV) actually write an
incorrect channel mask of 1 for mono WAV files.

13 months agoopusdec: Fix channel mask in mono float WAV output
Mark Harris [Thu, 1 Oct 2015 08:50:35 +0000 (01:50 -0700)]
opusdec: Fix channel mask in mono float WAV output

Mono channel mask changed from 1 (front left) to 4 (front center)
in WAV output.

13 months agoopusrtp::sniff() - Call pcap_close for any error condition.
Ralph Giles [Mon, 16 Jan 2017 19:00:14 +0000 (11:00 -0800)]
opusrtp::sniff() - Call pcap_close for any error condition.

This avoids leaking the handle on error.

13 months agoopusrtp::extract() - call pcap_close for any error condition
Giacomo Vacca [Sun, 15 Jan 2017 19:37:31 +0000 (20:37 +0100)]
opusrtp::extract() - call pcap_close for any error condition

Signed-off-by: Ralph Giles <giles@thaumas.net>
13 months agoopusrtp::extract() - use only if HAVE_PCAP
Giacomo Vacca [Sun, 15 Jan 2017 19:32:07 +0000 (20:32 +0100)]
opusrtp::extract() - use only if HAVE_PCAP

Signed-off-by: Ralph Giles <giles@thaumas.net>
13 months agoopusrtp: add extract (from file) option
Giacomo Vacca [Thu, 12 Jan 2017 10:42:46 +0000 (11:42 +0100)]
opusrtp: add extract (from file) option

Signed-off-by: Ralph Giles <giles@thaumas.net>
13 months agoopusdec: fix crash with 64-bit VS builds
Ricardo Constantino [Sat, 14 Jan 2017 18:39:50 +0000 (18:39 +0000)]
opusdec: fix crash with 64-bit VS builds

Fix suggested by mark4o.
Tested with 32 and 64-bit VS2015 and MinGW GCC 6.3.

Signed-off-by: Mark Harris <mark.hsj@gmail.com>
13 months agoopusenc: Sanitize sample rate, fix rate from AIFF
Mark Harris [Thu, 1 Oct 2015 08:53:04 +0000 (01:53 -0700)]
opusenc: Sanitize sample rate, fix rate from AIFF

Fix errors (not affecting common values) in reading the sample rate
from AIFF: the low 32 bits of the mantissa were incorrectly interpreted
as signed, the first byte rather than first bit was being used as
a sign, and non-integer rates were not properly rounded.

Although the sample rate is validated prior to setting up the
resampler, sample rates outside the range of an "int" could cause
undefined behavior prior to that when cast from double to int for
AIFF. Such rates could also be incorrect for WAV on 32-bit builds.
Ensure that the rate is within the range of an int prior to casting.

15 months agoFix potential uninitialized access for set-ctl-int
Michael Graczyk [Tue, 26 Apr 2016 03:43:34 +0000 (20:43 -0700)]
Fix potential uninitialized access for set-ctl-int

Signed-off-by: Mark Harris <mark.hsj@gmail.com>
17 months agoopusenc: Use correct types for WAV/AIFF fields
Mark Harris [Thu, 1 Oct 2015 08:44:34 +0000 (01:44 -0700)]
opusenc: Use correct types for WAV/AIFF fields

Don't treat unsigned fields as negative.
Fixes crash due to negative totalsamples.

17 months agoopusrtp: Fix clang -Wcast-align warning
Mark Harris [Fri, 18 Dec 2015 23:18:09 +0000 (15:18 -0800)]
opusrtp: Fix clang -Wcast-align warning

17 months agoopusenc: Write valid Opus file when 80+ channels
Mark Harris [Thu, 1 Oct 2015 08:47:24 +0000 (01:47 -0700)]
opusenc: Write valid Opus file when 80+ channels

17 months agoopusenc: Fix display of percent progress
Mark Harris [Thu, 1 Oct 2015 08:35:03 +0000 (01:35 -0700)]
opusenc: Fix display of percent progress

Fixes https://trac.xiph.org/ticket/2132, initial patch by rillke

17 months agoUse the appveyor badge for the xiph github repo.
Ralph Giles [Wed, 21 Sep 2016 19:35:18 +0000 (12:35 -0700)]
Use the appveyor badge for the xiph github repo.

17 months agoAdd badges
Chocobo1 [Sun, 31 Jul 2016 02:29:00 +0000 (10:29 +0800)]
Add badges

Signed-off-by: Ralph Giles <giles@thaumas.net>
17 months agoModernize README
Chocobo1 [Sun, 31 Jul 2016 02:27:45 +0000 (10:27 +0800)]
Modernize README

Adopt markdown format

Signed-off-by: Ralph Giles <giles@thaumas.net>
17 months agoopusenc: Sanitize WAV/AIFF fourccs
Mark Harris [Thu, 1 Oct 2015 08:32:06 +0000 (01:32 -0700)]
opusenc: Sanitize WAV/AIFF fourccs

Don't print control characters and other invalid bytes from invalid
WAV/AIFF fourccs to the terminal.

17 months agoopusenc: Ignore null comments from FLAC input
Mark Harris [Thu, 1 Oct 2015 08:56:43 +0000 (01:56 -0700)]
opusenc: Ignore null comments from FLAC input

Crash found by afl-fuzz.

17 months agoopusenc: Handle arbitrary AIFF/WAV chunk sizes
Mark Harris [Thu, 1 Oct 2015 08:29:03 +0000 (01:29 -0700)]
opusenc: Handle arbitrary AIFF/WAV chunk sizes

Properly handle chunks of any size from AIFF/WAV input files,
including padding them to an even size as required.  Also ensure
that a relevant message is displayed on any AIFF/WAV open failure.

See oggenc https://trac.xiph.org/ticket/1817,
https://trac.xiph.org/ticket/1912,
https://trac.xiph.org/ticket/2212 (CVE-2015-6749).

17 months agoopusenc: Consistently use large file interfaces
Mark Harris [Thu, 1 Oct 2015 08:54:32 +0000 (01:54 -0700)]
opusenc: Consistently use large file interfaces

Fix potential infinite loop on a specially-crafted input file if
"long" is only 32 bits.  Also on some systems, including some
versions of Windows and 32-bit OS X, fseek() cannot handle large
files even if the offset fits within a "long".

These issues are addressed by consistently using the fseek/ftell
variants that can handle large files, when available, for all input
file processing rather than in only one place.  Don't try to seek
or use the result if ftell() returns an error (e.g. EOVERFLOW).
If large file interfaces are not available, handle seeking in chunks
rather than wrapping and potentially causing an infinite loop.  When
reading data until EOF, treat the ftell() value as only an estimate
for percent progress; if the file grows, do not discard data after
this point.

17 months agoopusenc: Validate AIFF/WAV channel count
Mark Harris [Thu, 1 Oct 2015 08:25:13 +0000 (01:25 -0700)]
opusenc: Validate AIFF/WAV channel count

Interpret channel count properly for input format (signed for AIFF,
unsigned for WAV) and reject invalid values.

Fixes https://trac.xiph.org/ticket/2136 (CVE-2014-9639),
https://trac.xiph.org/ticket/2137 (CVE-2014-9638).

18 months agoAdd appveyor.yml
Ricardo Constantino (:RiCON) [Wed, 27 Jul 2016 00:19:42 +0000 (01:19 +0100)]
Add appveyor.yml

This enables automated testing of windows builds.

Compile opus and libogg with same configuration and platform.
Wasn't able to get the artifacts from the respective autobuilds.

Package executables into artifact and change its name to contain version.

Signed-off-by: Ralph Giles <giles@thaumas.net>
18 months agoVS2015: Use united opus lib.
Ricardo Constantino (:RiCON) [Tue, 26 Jul 2016 21:23:25 +0000 (22:23 +0100)]
VS2015: Use united opus lib.

Signed-off-by: Ralph Giles <giles@thaumas.net>
18 months agoVS2015: Use simple project to run genversion.bat.
Ricardo Constantino (:RiCON) [Tue, 26 Jul 2016 21:21:51 +0000 (22:21 +0100)]
VS2015: Use simple project to run genversion.bat.

Avoids trying to create and replace version.h more than once which
led to file-locking errors with multicore builds.

Signed-off-by: Ralph Giles <giles@thaumas.net>
18 months agoVS2015: Use same format for intermediate and output dirs as opus.
Ricardo Constantino (:RiCON) [Tue, 26 Jul 2016 21:19:51 +0000 (22:19 +0100)]
VS2015: Use same format for intermediate and output dirs as opus.

Signed-off-by: Ralph Giles <giles@thaumas.net>
18 months agoVS2015: Add x64 target to solution.
Ricardo Constantino (:RiCON) [Tue, 26 Jul 2016 21:18:08 +0000 (22:18 +0100)]
VS2015: Add x64 target to solution.

Fix x64 include paths which were using previous directory hierarchy.

Signed-off-by: Ralph Giles <giles@thaumas.net>
18 months agoMove VS2015 only ignores to dedicated win32/.gitignore
Ricardo Constantino (:RiCON) [Tue, 26 Jul 2016 21:09:05 +0000 (22:09 +0100)]
Move VS2015 only ignores to dedicated win32/.gitignore

Signed-off-by: Ralph Giles <giles@thaumas.net>
19 months agoAdd a travis-ci.org config file for integration testing.
Ralph Giles [Tue, 26 Jul 2016 17:15:54 +0000 (10:15 -0700)]
Add a travis-ci.org config file for integration testing.

19 months agoRemove obsolete windows builds files from dist.
Ralph Giles [Tue, 26 Jul 2016 17:07:18 +0000 (10:07 -0700)]
Remove obsolete windows builds files from dist.

19 months agoPut back win32 version.
Ralph Giles [Tue, 26 Jul 2016 16:32:22 +0000 (09:32 -0700)]
Put back win32 version.

This should be updated by genversion.bat as part of the build
and not checked in, really.

19 months agoAdd Visual Studio Git Ignores
Orestes [Wed, 11 May 2016 16:31:47 +0000 (17:31 +0100)]
Add Visual Studio Git Ignores

Signed-off-by: Ralph Giles <giles@mozilla.com>
19 months agoAdd VS2015 files!
Orestes [Wed, 11 May 2016 16:31:14 +0000 (17:31 +0100)]
Add VS2015 files!

Tested with opus and ogg dependencies built, opus-tools build
beautifully :-)

Signed-off-by: Ralph Giles <giles@mozilla.com>
19 months agoTidy VS2010 project files.
Orestes Zoupanos [Wed, 11 May 2016 01:02:43 +0000 (02:02 +0100)]
Tidy VS2010 project files.

Signed-off-by: Ralph Giles <giles@mozilla.com>
20 months agoopusrtp: don't leak file stream on error
Tristan Matthews [Mon, 13 Jun 2016 21:05:58 +0000 (22:05 +0100)]
opusrtp: don't leak file stream on error

2 years agoFix PIE configure test
Christian Weisgerber [Wed, 27 Jan 2016 15:53:57 +0000 (15:53 +0000)]
Fix PIE configure test

In opus-tools, the current PIE configure test assumes that the opus
headers have been installed under the default header search path
of the compiler.  This isn't necessarily the case (/usr/local,
/opt, ...).

Use the detected opus include location instead.

Signed-off-by: Ralph Giles <giles@thaumas.net>
2 years agoFix a comment typo.
Ralph Giles [Wed, 9 Sep 2015 23:54:41 +0000 (16:54 -0700)]
Fix a comment typo.

3 years agoAdd --quiet to opusenc and opusdec man pages.
David Fifield [Tue, 2 Dec 2014 18:48:53 +0000 (10:48 -0800)]
Add --quiet to opusenc and opusdec man pages.

For opusdec it was only missing from the summary.

3 years agoOpusdec doesn't handle chaining that changes the channel count. Exit in that case.
Gregory Maxwell [Mon, 1 Dec 2014 21:12:47 +0000 (13:12 -0800)]
Opusdec doesn't handle chaining that changes the channel count. Exit in that case.

Also handle malloc failure in a few more cases.

3 years agoopusenc: reject sampling rates over 768KHz or under 100Hz.
Gregory Maxwell [Fri, 28 Nov 2014 05:17:54 +0000 (21:17 -0800)]
opusenc: reject sampling rates over 768KHz or under 100Hz.

Crazy sampling rates cause unreasonable memory usage.

This also moves lpc.c temporary buffers onto the heap, we use them once
per file, so the additional malloc activity is not a concern.

Thanks to Dennis Felsing for the report and example inputs.