Diego Biurrun
7f9f771eac
avcodec: Don't anonymously typedef structs
10 years ago
Michael Niedermayer
3384d76503
avcodec/wmaprodec: Use avpriv_float_dsp_alloc()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
5dcb99033d
avcodec/wmaprodec: Fix integer overflow in sfb_offsets initialization
...
Fixes out of array read
Fixes: asan_heap-oob_2aec5b0_1828_classical_22_16_2_16000_v3c_0_exclusive_0_29.wma
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Reimar Döffinger
4fe448738e
WMA: add "const" to avoid warnings with hardcoded tables.
...
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
10 years ago
Diego Biurrun
cba4e6062a
More correct printf format specifiers
...
This avoids compiler warnings about argument and specifier type mismatch.
11 years ago
Diego Biurrun
cc8163e1a3
avcodec: more correct printf specifiers
11 years ago
Michael Niedermayer
d5ec8ba7f2
Do not leave positive values undefined when negative are defined as error
...
Define positive return values as non errors and leave further meaning undefined
This allows future extensions to use these values
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Diego Biurrun
b2bed9325d
cosmetics: Group .name and .long_name together in codec/format declarations
11 years ago
Michael Niedermayer
c99d27287d
avcodec/wmaprodec: check that there are input bits left in decode_subframe_length()
...
Fixes infinite loop
Fixes Ticket2987
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Diego Biurrun
03039f4c8c
miscellaneous typo fixes
11 years ago
Michael Niedermayer
7d9cb12689
avcodec/wmaprodec: Check block_align
...
Fixes undefined behavior
Its not known if this condition can be triggered through crafted input.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Luca Barbato
02ec656af7
wmapro: error out on impossible scale factor offsets
...
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
12 years ago
Luca Barbato
d4a217a408
wmapro: check the min_samples_per_subframe
...
Must be at least WMAPRO_BLOCK_MIN_SIZE.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
12 years ago
Luca Barbato
3822936252
wmapro: check num_vec_coeffs against the actual available buffer
...
Prevent yet another buffer overwrite.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
12 years ago
Luca Barbato
6652338f43
wmapro: return early on unsupported condition
...
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
12 years ago
Luca Barbato
e30b068ef7
wmapro: make sure there is room to store the current packet
...
Prevent horrid and hard to trace struct overwrite.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
12 years ago
Michael Niedermayer
c7a7605656
wmaprodec: Fix null pointer dereference in decode_frame()
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Diego Biurrun
12e25ed284
avcodec: av_log_missing_feature(1) ---> avpriv_request_sample()
12 years ago
Diego Biurrun
6d97484d72
avcodec: av_log_ask_for_sample() ---> avpriv_request_sample()
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
Janne Grunau
08149b2b39
wmapro: unref skipped frames
12 years ago
Anton Khirnov
4c0080b7e7
wmaprodec: return an error, not 0, when the input is too small.
...
Returning 0 may result in an infinite loop in valid calling programs. A
decoder should never return 0 without producing any output.
CC:libav-stable@libav.org
12 years ago
Anton Khirnov
cacad1c058
wmaprodec: require block_align to be set.
...
Avoids an infinite loop in the calling programs with decoder not
consuming any input and not returning output.
CC:libav-stable@libav.org
12 years ago
Anton Khirnov
759001c534
lavc decoders: work with refcounted frames.
12 years ago
Diego Biurrun
c242bbd8b6
Remove unnecessary dsputil.h #includes
12 years ago
Justin Ruggles
f4a283eec4
wmapro: decode directly to the user-provided AVFrame
12 years ago
Ronald S. Bultje
42d3246948
floatdsp: move vector_fmul_reverse from dsputil to avfloatdsp.
...
Now, nellymoserenc and aacenc no longer depends on dsputil. Independent
of this patch, wmaprodec also does not depend on dsputil, so I removed
it from there also.
12 years ago
Justin Ruggles
e034cc6c60
lavc: Move vector_fmul_window to AVFloatDSPContext
...
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
12 years ago
Diego Biurrun
f3298f1299
Return proper error code after av_log_ask_for_sample()
12 years ago
Diego Biurrun
511cf612ac
miscellaneous typo fixes
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
Justin Ruggles
284ea790d8
dsputil: move vector_fmul_scalar() to AVFloatDSPContext in libavutil
12 years ago
Michael Niedermayer
50f0a6b4e6
wmaprodec: check num_sfb for validity. Fix out of array accesses
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Justin Ruggles
002097a00b
wmapro: use AVCodecContext.channels instead of keeping a private copy
12 years ago
Justin Ruggles
f9d732c264
wmapro: use planar sample format
12 years ago
Diego Biurrun
717addecad
Use proper return values in case of missing features
12 years ago
Michael Niedermayer
99f392a584
wmaprodec: check num_vec_coeffs for validity
...
Fixes CVE-2012-2789
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Anton Khirnov <anton@khirnov.net>
12 years ago
Anton Khirnov
36ef5369ee
Replace all CODEC_ID_* with AV_CODEC_ID_*
12 years ago
Ronald S. Bultje
66adb7ce1b
Revert "wmapro: prevent division by zero when sample rate is unspecified"
...
This reverts commit 3693608023
. It was
already applied; no idea why it didn't error out while re-applying it.
12 years ago
Sean McGovern
3693608023
wmapro: prevent division by zero when sample rate is unspecified
...
This fixes Bugzilla #327 :
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
12 years ago
Sean McGovern
3680b24351
wmapro: prevent division by zero when sample rate is unspecified
...
This fixes Bugzilla #327 :
Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
12 years ago
Lou Logan
6851130fd6
cosmetics: minor libavcodec spelling errors
...
Also update some common misspelled words in patcheck
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
b21ba20cc8
wmaprodec: tighter check for num_vec_coeffs
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
9166f483c5
wmaprodec: check min_samples_per_subframe
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
b28c678ba8
wmaprodec; fix get_bits(0) case.
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
97a5addfcf
wmaprodec: check num_vec_coeffs for validity
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
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
3dde147ff9
cosmetics: Consistently place static, inline and av_cold attributes/keywords.
13 years ago
Diego Biurrun
a92be9b856
Replace memset(0) by zero initializations.
...
Also remove one pointless zero initialization in rangecoder.c.
13 years ago
Diego Biurrun
8ca6e523a6
wma: Refactor common code to fix standalone compilation of WMA lossless decoder.
13 years ago