Paul B Mahol
4511973901
wmalosslessdec: do not set avctx->coded_frame
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
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
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
Michael Niedermayer
6471f63da2
wmalosslessdec: make arrays indexed by ch large enough for maximum number of channels
...
Fixes out of array accesses
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Diego Biurrun
f3298f1299
Return proper error code after av_log_ask_for_sample()
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
Diego Biurrun
8f4c414df6
Improve wording and spelling of av_log_missing_feature messages.
12 years ago
Justin Ruggles
2725ce7c7c
wmalossless: output in planar sample format
12 years ago
Michael Niedermayer
89074e9066
wmalosslessdec: remove unused variable
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
d65d834731
wmalosslessdec: Reset put bit buffer when num_saved_bits is reset.
...
Fixes CVE-2012-2799
CC:libav-stable@libav.org
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Anton Khirnov <anton@khirnov.net>
12 years ago
Anton Khirnov
6a99310fce
wmalosslessdec: Fix reading too many bits in decode_channel_residues()
...
Fixes a part of CVE-2012-2795
CC:libav-stable@libav.org
Based on a patch by Michael Niedermayer <michaelni@gmx.at>
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
12 years ago
Michael Niedermayer
f48fbf2eb5
wmalosslessdec: fix a get_bits(0) in decode_ac_filter
...
Fixes a part of CVE-2012-2795
CC:libav-stable@libav.org
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Anton Khirnov <anton@khirnov.net>
12 years ago
Michael Niedermayer
607f57152c
wmalosslessdec: make MCLMS arrays big enough for what is written into them.
...
Fixes a part of CVE-2012-2795
CC:libav-stable@libav.org
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Anton Khirnov <anton@khirnov.net>
12 years ago
Anton Khirnov
065b3a1cfa
wmalosslessdec: increase channel_coeffs/residues size
...
Fixes CVE-2012-2792
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
12 years ago
Anton Khirnov
4a969030e4
wmalosslessdec: increase WMALL_BLOCK_MAX_BITS to 14.
12 years ago
Michael Niedermayer
b0545800bd
wmalosslessdec: remove unused variable
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Anton Khirnov
36ef5369ee
Replace all CODEC_ID_* with AV_CODEC_ID_*
12 years ago
Diego Biurrun
30b1961c66
Mark a number of variables only used in av_dlog() calls as av_unused.
...
This fixes a number of unused-but-set gcc warnings.
13 years ago
Jakub Stachowski
ddffe3de43
WMAL: Shift output samples by the specified number of padding zeroes.
...
Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
13 years ago
Mashiat Sarker Shakkhar
363c3a44ff
WMAL: Restore removed code in mclms_predict()
...
Based on observations made by Jakub Stachowski <qbast@go2.pl>
Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
13 years ago
Kostya Shishkov
0e23b50821
wmall: fix reconstructing audio with uncoded channels
13 years ago
Mashiat Sarker Shakkhar
c8370e6e35
WMAL cosmetics: fix indentation
...
Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
13 years ago
Jakub Stachowski
8501bed08c
Don't restrict reverse decorrelation to both coded channels. It is also used for mono data.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Jakub Stachowski
035a394eac
WMAL: do not output last frame again if nothing was decoded in current packet
...
Reviewed-by: Mashiat Sarker Shakkhar <mashiat.sarker@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
13 years ago
Mashiat Sarker Shakkhar
f92f452378
WMAL: do not start decoding if frame does not end in current packet
...
This fixes decoding of frames which span more than two packets. Tested with
recit24.wma.
Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
13 years ago
Jakub Stachowski
93bf1aac6a
wmalossless: Ensure that last frame is not written again if nothing was decoded in current packet.
...
Reviewed-by: Mashiat Sarker Shakkhar <mashiat.sarker@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Jakub Stachowski
56dcfe87ef
Clear residues only in not coded channel. This fixes overwriting coded residues with zeros if first channel is coded and second is not.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
64bd7f8e4d
wmalosslessdec: Reset put bit buffer when num_saved_bits is reset.
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Mashiat Sarker Shakkhar
dac79c2737
wmal: vertical alignment cosmetics
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
13 years ago
Mashiat Sarker Shakkhar
2e13f57993
wmal: Warn about missing bitstream splicing feature and ask for sample.
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
13 years ago
Mashiat Sarker Shakkhar
9900dd2d9c
wmal: Skip seekable_frame_in_packet.
...
There is no point in storing the value in a variable, since it is not
used anywhere else in the decoder.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
13 years ago
Mashiat Sarker Shakkhar
07933b44dd
wmal: Drop unused variable num_possible_block_size.
...
This is probably a leftover from WMA Pro.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
13 years ago
Michael Niedermayer
b3a4351582
wmalosslessdec: Fix reading too many bits in decode_channel_residues()
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
2a7063de54
wmalosslessdec: fix a get_bits(0) in decode_ac_filter
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
a0abefb0af
wmalosslessdec: make mclms arrays big enough for whats written into them.
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
d442c4462a
wmalosslessdec: Make arrays WMALL_BLOCK_MAX_SIZE big and check samples_per_frame.
...
The samples_per_frame check is ported from wmaprodec.c
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
680097cb6d
WMAL: Do not try to read rawpcm coefficients if bits is invalid
...
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Jakub Stachowski
3b00fd5985
wmalosslessdec: Reset residues to 0 if they were not decoded from bitstream.
...
If channel residues are have not been decoded from bitstream, they should be
initialized to 0 instead of using values from previous subframe.
This causes bursts of noise in silent parts of some files.
This patch fixes bug #1055
Reviewed-by: Benjamin Larsson <benjamin@southpole.se>
Reviewed-by: Mashiat Sarker Shakkhar <mashiat.sarker@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
59edf33f7b
wmalosslessdec: rawpcm_tile fixes to keep get_bits() values within defined range.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
d0212bb032
wmalosslessdec: channel residues can be 32 bit thus need _long bitreader.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Mashiat Sarker Shakkhar
28e8c4d59a
WMAL: Remove inaccurate and unnecessary doxy
...
A call to decode_packet() does not always decode a complete WMA packet.
Moreover, this is not the correct place to document calls that are part
of the public API.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
13 years ago
Ronald S. Bultje
d360dd902c
wmall: fix seeking.
13 years ago
Ronald S. Bultje
3c9267673e
wmalossless: error out if a subframe is not used by any channel.
...
Prevents infinite loop because min_channel_len never increments.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
13 years ago
Ronald S. Bultje
d462949974
wmalossless: reset sample pointer for each subframe.
...
Prevents overwrites when some subframes only encode some channels.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
13 years ago
Ronald S. Bultje
326f7a68bb
wmalossless: error out on invalid values for order.
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
13 years ago
Kostya Shishkov
87818103a0
wmall: output packet only if we have decoded some samples
...
Also set CODEC_CAP_DELAY to indicate that decoder may still have some
undecoded data left in internal buffer.
13 years ago
Ronald S. Bultje
626964a4c4
wmall: fix build with -DDEBUG enabled.
13 years ago