Commit Graph

79 Commits

Author SHA1 Message Date
Vittorio Giovara def97856de lavc: AV-prefix all codec capabilities
Express bitfields more simply.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-07-27 15:24:58 +01:00
Andreas Cadhalpun 60f1cc4a1f alsdec: only adapt order for positive max_order
For max_order = 0 the clipping range is invalid. (amin = 2, amax = 1)

CC: libav-stable@libav.org
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-05-05 16:10:52 +02:00
Andreas Cadhalpun 94bb1ce882 alsdec: check sample pointer range in revert_channel_correlation
Also change the type of begin, end and smp to ptrdiff_t to make the
comparison well-defined.

CC: libav-stable@libav.org
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-05-05 16:06:58 +02:00
Andreas Cadhalpun e191aaca44 alsdec: limit avctx->bits_per_raw_sample to 32
avctx->bits_per_raw_sample is used in get_sbits_long, which only
supports up to 32 bits.

CC: libav-stable@libav.org
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-05-05 10:22:29 +02:00
Vittorio Giovara 6a85dfc830 lavc: Replace av_dlog and tprintf with internal macros 2015-04-19 12:41:59 +01:00
Diego Biurrun 7f9f771eac avcodec: Don't anonymously typedef structs 2015-02-14 10:13:49 -08:00
Diego Biurrun c67b449beb dsputil: Split bswap*_buf() off into a separate context 2014-06-22 18:22:31 -07:00
Diego Biurrun cc8163e1a3 avcodec: more correct printf specifiers 2014-03-22 14:08:20 +01:00
Reinhard Tartler 2a0fb7286d alsdec: check block length
Fix writing over the end

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Addresses: CVE-2013-0845
2013-12-10 07:21:40 -05:00
Anton Khirnov 23a211cbba lavc: change all decoders to behave consistently with AV_EF_CRCCHECK.
Just crccheck prints a warning, crccheck+explode returns an error.

Also document this behavior.
2013-10-28 07:22:18 +01:00
Diego Biurrun b2bed9325d cosmetics: Group .name and .long_name together in codec/format declarations 2013-10-03 23:32:01 +02:00
Luca Barbato ca488ad480 alsdec: Clean up error paths
Fix at least a memory leak.

CC: libav-stable@libav.org
2013-07-23 23:03:37 +02:00
Luca Barbato 70ecc175c7 alsdec: Fix the clipping range
mcc_weightings is only 32 elements.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-07-23 23:03:37 +02:00
Diego Biurrun 2832ea26f3 Remove commented-out debug #define cruft 2013-05-16 00:23:30 +02:00
Diego Biurrun 63d744e2be av_log_missing_feature() ---> avpriv_report_missing_feature() 2013-03-13 20:42:21 +01:00
Anton Khirnov 759001c534 lavc decoders: work with refcounted frames. 2013-03-08 07:38:30 +01:00
Justin Ruggles 9b0b355e97 als: decode directly to the user-provided AVFrame 2013-02-12 12:21:21 -05:00
Anton Khirnov 594d4d5df3 lavc: add a wrapper for AVCodecContext.get_buffer().
It will be useful in the upcoming transition to refcounted AVFrames.
2012-12-04 21:41:59 +01:00
Diego Biurrun 717addecad Use proper return values in case of missing features 2012-10-12 20:56:54 +02:00
Clément Bœsch ee0f53e966 alsdec: fix misplaced parentheses.
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-09-17 14:17:27 -04:00
Thilo Borgmann ac3f5a6879 alsdec: check return values.
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-09-17 14:17:27 -04:00
Thilo Borgmann 66197988b1 alsdec: fix number of decoded samples in first sub-block in BGMC mode.
Fixes CVE-2012-2790

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-09-17 14:17:27 -04:00
Thilo Borgmann 97f0efbfb8 alsdec: Fix out of ltp_gain_values read.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-09-17 14:17:27 -04:00
Michael Niedermayer 5b051ec3bd alsdec: Check that quantized parcor coeffs are within range.
ALS spec:
	11.6.3.1.1 Quantization and encoding of parcor coefficients
	...
	In all cases the resulting quantized values ak are restricted to the range [-64,63].

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-09-17 14:17:27 -04:00
Michael Niedermayer 9853e41aa0 alsdec: check opt_order.
Fixes out of array write in quant_cof.
Also make sure no invalid opt_order stays in the context.

Fixes CVE-2012-2775

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-09-17 14:17:26 -04:00
Michael Niedermayer 23aae62c2c alsdec: Check k used for rice decoder.
Values that fail this check will cause failure of decode_rice()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-09-17 14:17:26 -04:00
Anton Khirnov 36ef5369ee Replace all CODEC_ID_* with AV_CODEC_ID_* 2012-08-07 16:00:24 +02:00
Mans Rullgard 4ca6d206d1 alsdec: remove dead assignments
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-07-01 20:38:14 +01:00
Martin Storsjö 00c3b67b8a cosmetics: Align codec declarations
Also break some long lines, remove codec function placeholder comments
and add spaces in sample/pixel format lists.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-04-06 22:37:38 +03:00
Diego Biurrun a92be9b856 Replace memset(0) by zero initializations.
Also remove one pointless zero initialization in rangecoder.c.
2012-03-28 09:38:33 +02:00
Justin Ruggles 0efa4073bf alsdec: do not set AVCodecContext.frame_size
It is not necessary
2012-03-05 13:08:17 -05:00
Ronald S. Bultje af468015d9 als: prevent infinite loop in zero_remaining().
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-02-17 12:35:08 -08:00
Martin Storsjö 9cf0841ef3 dsputil: Add ff_ prefix to the dsputil*_init* functions
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-15 22:06:34 +02:00
Alex Converse 7181c4edee cosmetics: Remove extra newlines at EOF 2012-01-27 17:19:09 -08:00
Janne Grunau fd095539d1 latmdec: fix audio specific config parsing
Pass the correct size in bits to mpeg4audio_get_config and add a flag
to disable parsing of the sync extension when the size is not known.

Latm with AudioMuxVersion 0 does not specify the size of the audio
specific config. Data after the audio specific config can be
misinterpreted as sync extension resulting in random and wrong configs.
2011-12-03 00:42:48 +01:00
Justin Ruggles 0eea212943 Add avcodec_decode_audio4().
Deprecate avcodec_decode_audio3().
Implement audio support in avcodec_default_get_buffer().
Implement the new audio decoder API in all audio decoders.
2011-12-02 17:40:40 -05:00
Dustin Brody 9abc98737f lavc: replace references to deprecated AVCodecContext.error_recognition to use AVCodecContext.err_recognition
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-10-22 14:49:55 +02:00
Anton Khirnov 59a9a23581 lavc: use avpriv_ prefix for some mpeg4audio symbols used in lavf.
Specifically, ff_mpeg4audio_sample_rates, ff_mpeg4audio_get_config and
ff_copy_pce_data
2011-10-20 21:06:57 +02:00
Anton Khirnov ec6402b7c5 lavc: use designated initialisers for all codecs.
It's more readable and less prone to breakage.
2011-07-29 08:42:34 +02:00
Justin Ruggles e6c52cee54 Replace usages of av_get_bits_per_sample_fmt() with av_get_bytes_per_sample().
av_get_bits_per_sample_fmt() is deprecated.
2011-06-20 18:56:06 -04:00
Mans Rullgard 2912e87a6c Replace FFmpeg with Libav in licence headers
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-19 13:33:20 +00:00
Reinhard Tartler 737eb5976f Merge libavcore into libavutil
It is pretty hopeless that other considerable projects will adopt
libavutil alone in other projects. Projects that need small footprint
are better off with more specialized libraries such as gnulib or rather
just copy the necessary parts that they need. With this in mind, nobody
is helped by having libavutil and libavcore split. In order to ease
maintenance inside and around FFmpeg and to reduce confusion where to
put common code, avcore's functionality is merged (back) to avutil.

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2011-02-15 16:18:21 +01:00
Luca Barbato dfd2a005eb Replace dprintf with av_dlog
dprintf clashes with POSIX.1-2008
2011-01-29 23:55:37 +01:00
Vitor Sessak e0eb963aaa Fix memory leak in ALS decoder in big endian systems
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-29 18:09:42 +00:00
Diego Elio Pettenò d36beb3f69 Add ff_ prefix to data symbols of encoders, decoders, hwaccel, parsers, bsf.
None of these symbols should be accessed directly, so declare them as
hidden.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-26 16:08:45 +00:00
Sprezz efd63823e6 alsdec: Correct the ALS decoder by storing some parameters per-channel rather
than just per-block. Patch by Sprezz [sprezzatura gmx com]. Fixes Issue 2387.

Originally committed as revision 25898 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-06 15:18:50 +00:00
Stefano Sabatini 5d6e4c160a Replace deprecated symbols SAMPLE_FMT_* with AV_SAMPLE_FMT_*, and enum
SampleFormat with AVSampleFormat.

Originally committed as revision 25730 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-12 11:04:40 +00:00
Thilo Borgmann a29039aef3 Reindent after last commit.
Originally committed as revision 25711 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-08 15:24:11 +00:00
Thilo Borgmann 4051ae7617 Allow clean initialization of lut_status array by changing type to signed int.
Originally committed as revision 25710 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-08 15:22:15 +00:00
Stefano Sabatini ba7d6e798e Remove usage of deprecated libavcodec/audioconvert.h functions.
Originally committed as revision 25668 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-03 20:19:34 +00:00