Diego Biurrun
63d744e2be
av_log_missing_feature() ---> avpriv_report_missing_feature()
12 years ago
Clément Bœsch
1ec94b0f06
lavc: factorize ff_{thread_,re,}get_buffer error messages.
...
Coccinelle profile used:
@@
expression r, ctx, f, loglevel, str, flags;
@@
-if ((r = ff_get_buffer(ctx, f, flags)) < 0) {
- av_log(ctx, loglevel, str);
- return r;
-}
+if ((r = ff_get_buffer(ctx, f, flags)) < 0)
+ return r;
@@
expression r, ctx, f, loglevel, str;
@@
-if ((r = ff_reget_buffer(ctx, f)) < 0) {
- av_log(ctx, loglevel, str);
- return r;
-}
+if ((r = ff_reget_buffer(ctx, f)) < 0)
+ return r;
@@
expression r, ctx, f, loglevel, str, flags;
@@
-if ((r = ff_thread_get_buffer(ctx, f, flags)) < 0) {
- av_log(ctx, loglevel, str);
- return r;
-}
+if ((r = ff_thread_get_buffer(ctx, f, flags)) < 0)
+ return r;
...along with some manual patches for the remaining ones.
12 years ago
Anton Khirnov
759001c534
lavc decoders: work with refcounted frames.
12 years ago
Justin Ruggles
9b0b355e97
als: decode directly to the user-provided AVFrame
12 years ago
Michael Niedermayer
4484c722f6
alsdec/read_specific_config: check for init_get_bits failure
...
This also fixes a potential integer overflow
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Reviewed-by: Thilo Borgmann <thilo.borgmann@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Thilo Borgmann
bfde6e5c02
alsdec: Introduce failsafe switch to keep ALSSpecificConfig consistent to the input.
...
Reveiwed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Thilo Borgmann
95f81159de
alsdec: Consistently use a period at the end of error messages.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Paul B Mahol
d4211c4722
alsdec: change channel sorting so it match reference implementation
...
Read channel source instead of channel target for channel sorting.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
d885cc41e5
Fix "knwon" typo and add a check in tools/patcheck
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
98fed176cf
alsdec: improve warning message when invalid channel position is found
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
fb3f28ee28
alsdec: cosmetics after previous commit
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
ae27b70b9d
alsdec: channel sorting
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Michael Niedermayer
1818a1130d
alsdec: propagate error codes in read_block()
...
Reviewed-by: Thilo Borgmann <thilo.borgmann@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
0213d5ad86
alsdec: make return checking for read_*_block_data() consistent
...
Reviewed-by: Thilo Borgmann <thilo.borgmann@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
79bfba14b7
alsdec: Use AVERROR_INVALIDDATA in read_const_block_data
...
Reviewed-by: Thilo Borgmann <thilo.borgmann@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
0ceca269b6
alsdec: check block length
...
Fix writing over the end
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Anton Khirnov
594d4d5df3
lavc: add a wrapper for AVCodecContext.get_buffer().
...
It will be useful in the upcoming transition to refcounted AVFrames.
12 years ago
Thilo Borgmann
feaff427c0
alsdec: fix clipping of weightings for MCC decoding
...
Fixes CID717905
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Diego Biurrun
717addecad
Use proper return values in case of missing features
12 years ago
Clément Bœsch
ee0f53e966
alsdec: fix misplaced parentheses.
...
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
12 years ago
Thilo Borgmann
ac3f5a6879
alsdec: check return values.
...
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
12 years ago
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>
12 years ago
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>
12 years ago
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>
12 years ago
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>
12 years ago
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>
12 years ago
Anton Khirnov
36ef5369ee
Replace all CODEC_ID_* with AV_CODEC_ID_*
12 years ago
Michael Niedermayer
b2527d5d5a
Revert "alsdec: remove dead assignments"
...
This reverts commit 4ca6d206d1
.
The assignment is not dead, this should fix fate failures on BSD
13 years ago
Mans Rullgard
4ca6d206d1
alsdec: remove dead assignments
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
13 years ago
Carl Eugen Hoyos
396d2aecc5
alsdec.c: Also test 0 when checking rice decoder values.
...
Suggested-by: Thilo Borgmann
13 years ago
Carl Eugen Hoyos
849172882c
alsdec.c: Simplify error check before calling rice decoder.
...
Reviewed-by: Thilo Borgmann
13 years ago
Thilo Borgmann
2837d8dc27
alsdec: fix number of decoded samples in first sub-block in BGMC mode.
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
6c3d6a214c
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>
13 years ago
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>
13 years ago
Diego Biurrun
a92be9b856
Replace memset(0) by zero initializations.
...
Also remove one pointless zero initialization in rangecoder.c.
13 years ago
Thilo Borgmann
7ea948bac3
alsdec: check return values.
13 years ago
Michael Niedermayer
dfacef9e73
alsdec: make sure no invalid opt_order stays in the context.
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Thilo Borgmann
5afd9a80db
als: consistent messages
...
"." for warnings, "!" for errors.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Thilo Borgmann
04dc7e7e5e
ALS error message pretty print
...
One prettier message.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
9d3032b960
alsdec: check opt_order.
...
Fixes out of array write in quant_cof
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Thilo Borgmann
599881b028
alsdec: Fix out of ltp_gain_values read.
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Thilo Borgmann
daeffccd98
alsdec: pretty print for another log message
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Justin Ruggles
0efa4073bf
alsdec: do not set AVCodecContext.frame_size
...
It is not necessary
13 years ago
Michael Niedermayer
8534881a38
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>
13 years ago
Ronald S. Bultje
af468015d9
als: prevent infinite loop in zero_remaining().
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
13 years ago
Martin Storsjö
9cf0841ef3
dsputil: Add ff_ prefix to the dsputil*_init* functions
...
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Alex Converse
7181c4edee
cosmetics: Remove extra newlines at EOF
13 years ago
Philippe Saint-Pierre
f0f2babca2
Fix possible infinite loop decoding als.
...
Reviewed-by: Thilo Borgmann
13 years ago
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.
13 years ago
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.
13 years ago