Commit Graph

35093 Commits

Author SHA1 Message Date
Martin Storsjö
ca074cc313 xtea: Factorize testing into a separate function
Based on a patch by Michael Niedermayer.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-03 19:19:37 +03:00
Diego Biurrun
fd712a5584 configure: Refactor HAVE_ options available on the command line 2012-10-03 18:08:25 +02:00
Diego Biurrun
8be5b0d6d5 avconv/avprobe: Add missing 'void' to exit_program() definition 2012-10-03 18:07:49 +02:00
Mans Rullgard
05e209c04c Allow use of strncpy()
There are cases where strncpy() does exactly what is required.
A blanket ban forces more convoluted solutions to be used in those
cases and has been a cause of bugs.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-03 14:36:51 +01:00
Martin Storsjö
75366a504d blowfish: Add more tests
Test inplace ECB, normal CBC and inplace CBC encryption/decryption.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-03 16:05:54 +03:00
Martin Storsjö
87f023f2c0 blowfish: Fix CBC decryption with dst==src
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-03 16:05:23 +03:00
Martin Storsjö
0cc9a64b92 blowfish: Factorize testing into a separate function
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-03 16:05:05 +03:00
Mans Rullgard
51a15ed740 ARM: use numeric ID for Tag_ABI_align_preserved
Some old assemblers still in use do not support named tags.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-03 11:49:55 +01:00
Martin Storsjö
4edb34f6cc segment: Pass the interrupt callback on to the chained AVFormatContext, too
This might not be needed at the moment, but it's good practice to
pass it to all chained AVFormatContexts, if it would happen to be
used there at a later point.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-02 22:14:07 +02:00
Mans Rullgard
1ca3b62b10 ARM: bswap: drop armcc version of av_bswap16()
This function causes several versions of armcc to miscompile code,
and the performance impact is small.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-02 19:47:56 +01:00
Mans Rullgard
5e826fd65e ARM: set Tag_ABI_align_preserved in all asm files
All our ARM asm preserves alignment so setting this attribute
in a common location is simpler.  This removes numerous warnings
when linking with armcc.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-02 19:47:56 +01:00
Mans Rullgard
7bda4ed780 ARM: fix Thumb PIC on Apple
LDR with register offset and PC as base register is not available in
the Thumb instruction set so the addition must be done separately.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-02 13:12:33 +01:00
Luca Barbato
72d30b2792 nut: add do {} while (0) to GET_V
Make it consistent with the other function-like macros.
2012-10-02 12:16:47 +02:00
Alex Converse
b92dfb56d4 tiffenc: Check av_malloc() results. 2012-10-01 17:46:44 -07:00
Alex Converse
9bc055e358 tiffenc: Simplify pixel format setup using AVPixFmtDescriptor. 2012-10-01 17:46:44 -07:00
Diego Elio Pettenò
5e3f9979fa Use atexit() instead of defining a custom exit_program() interface. 2012-10-01 17:17:42 -04:00
Derek Buitenhuis
bd680c7b49 msvc: Fix detection of VFW & Avisynth required libs
It should be vfw32.lib with MSVC.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2012-10-01 16:39:40 -04:00
Luca Barbato
1e46c63eb7 avformat: refactor avformat_write_header
Split away option settings, sanity checks and general setup.
2012-10-01 19:57:57 +02:00
Luca Barbato
86bbdf865e avformat: refactor avformat_write_header
Mostly cosmetic changes adding some intermediate to shorten the lines.
2012-10-01 19:57:57 +02:00
Luca Barbato
55f9037f38 avformat: split muxing functions from util.c 2012-10-01 19:57:57 +02:00
Justin Ruggles
bfcd4b6a16 adpcmdec: set AVCodec.sample_fmts 2012-10-01 13:42:44 -04:00
Justin Ruggles
1478a3601e twinvq: use planar sample format 2012-10-01 13:42:44 -04:00
Justin Ruggles
a34be78546 ralf: use planar sample format 2012-10-01 13:42:44 -04:00
Justin Ruggles
1a3459033d mpc7/8: use planar sample format 2012-10-01 13:42:44 -04:00
Justin Ruggles
3fca0d7210 iac/imc: use planar sample format 2012-10-01 13:42:43 -04:00
Justin Ruggles
64c312aa29 dcadec: use float planar sample format 2012-10-01 13:42:43 -04:00
Justin Ruggles
cbf6ee7823 cook: use planar sample format 2012-10-01 13:42:43 -04:00
Justin Ruggles
9af4eaa8ea atrac3: use float planar sample format 2012-10-01 13:42:43 -04:00
Justin Ruggles
461ba7e97a apedec: output in planar sample format 2012-10-01 13:42:43 -04:00
Justin Ruggles
cf8c93ada4 8svx: use planar sample format 2012-10-01 13:42:43 -04:00
Justin Ruggles
fd41cb4370 avconv: improve sample format negotiation for decoder request
This takes into account planar vs. packed when comparing to find the closest
sample format match.
2012-10-01 13:42:43 -04:00
Nathan Caldwell
6cb8c85409 Opus encoder using libopus
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-10-01 14:42:40 +02:00
Diego Biurrun
15d35bee83 mpegts: Drop pointless casting of hex_dump_debug arguments 2012-10-01 13:18:28 +02:00
Diego Biurrun
d3c40a7d1d avformat: const correctness for av_hex_dump / av_hex_dump_log 2012-10-01 13:18:28 +02:00
Diego Biurrun
d25fe4cc65 wmadec: Adjust debug printf argument length modifier 2012-10-01 12:46:41 +02:00
Diego Biurrun
1218777ffd avcodec: Convert some commented-out printf/av_log instances to av_dlog 2012-10-01 10:24:28 +02:00
Diego Biurrun
9c6cf7f2c9 avcodec: Drop silly and/or broken printf debug output 2012-10-01 10:24:28 +02:00
Diego Biurrun
6f6b0311a3 avcodec: Drop some silly commented-out av_log() invocations 2012-10-01 10:24:28 +02:00
Diego Biurrun
72eaba5e4f avformat: Convert some commented-out printf/av_log instances to av_dlog 2012-10-01 10:24:28 +02:00
Diego Biurrun
11d4e92ed9 avformat: Remove non-compiling and/or silly commented-out printf/av_log statements 2012-10-01 10:24:28 +02:00
Diego Biurrun
14d3e7ad11 Remove some silly disabled code. 2012-10-01 10:24:28 +02:00
Justin Ruggles
56b6a43056 ac3dec: ensure get_buffer() gets a buffer for the correct number of channels
If there is an error during frame parsing, but AVCodecContext.channels was
changed and AC3DecodeContext.out_channels was set previously, the two may not
match.

Fixes CVE-2012-2802
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind

CC: libav-stable@libav.org
2012-10-01 00:10:59 -04:00
Jindřich Makovička
1a8c6917f6 h264: avoid stuck buffer pointer in decode_nal_units
When decode_nal_units() previously encountered a NAL_END_SEQUENCE,
and there are some junk bytes left in the input buffer, but no start codes,
buf_index gets stuck 3 bytes before the end of the buffer.

This can trigger an infinite loop in the caller code, eg. in
try_decode_trame(), as avcodec_decode_video() then keeps returning zeroes,
with 3 bytes of the input packet still available.

With this change, the remaining bytes are skipped so the whole packet gets
consumed.

CC:libav-stable@libav.org

Signed-off-by: Jindřich Makovička <makovick@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-09-29 19:31:17 +02:00
Anton Khirnov
0f583d20d5 mpeg12: fix the semantics of the int* parameter of decode()
It is got_output, not data_size.
2012-09-29 19:18:39 +02:00
Anton Khirnov
d9a2e87b1c mpeg12: move mpeg_decode_frame() lower
Avoids a forward declaration of decode_chunks().
2012-09-29 19:18:24 +02:00
Michael Niedermayer
85f477935c avsdec: Set dimensions instead of relying on the demuxer.
The decode function assumes that the video will have those dimensions.

Fixes CVE-2012-2801

CC:libav-stable@libav.org

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-09-29 19:18:07 +02:00
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>
2012-09-29 19:17:38 +02:00
Anton Khirnov
d05f72c754 dfa: improve boundary checks in decode_dds1()
Fixes CVE-2012-2798

CC:libav-stable@libav.org
2012-09-29 19:17:07 +02:00
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
2012-09-29 19:16:32 +02:00
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>
2012-09-29 19:15:27 +02:00