Vittorio Giovara
07a0c0f000
opt: check memory allocation
...
CC: libav-stable@libav.org
Bug-Id: CID 1257771
10 years ago
Michael Niedermayer
0f931b29f7
Factorize avpriv_mirror() out
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Giorgio Vazzana
a3ab87427c
avutil/camellia: cosmetic fixes
...
Signed-off-by: Giorgio Vazzana <mywing81@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Giorgio Vazzana
fbb792f90f
avutil/camellia: use K[2] instead of *K in generate_round_keys()
...
Additionally, change parameters order.
Signed-off-by: Giorgio Vazzana <mywing81@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Giorgio Vazzana
8e38b1539e
avutil/camellia: make LR128() more robust
...
Signed-off-by: Giorgio Vazzana <mywing81@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Giorgio Vazzana
88d19d240a
avutil/camellia: fix documentation for av_camellia_crypt()
...
Signed-off-by: Giorgio Vazzana <mywing81@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Supraja Meedinti
c6bb651bce
libavutil: Added Camellia symmetric block cipher
...
Signed-off-by: Supraja Meedinti <supraja0493@gmail.com>
Previous version of this patch reviewed-by: Giorgio Vazzana <mywing81@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
James Almer
37b35feb64
x86/swr: add SSE2/AVX pack_8ch functions
...
Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
10 years ago
Michael Niedermayer
827af24230
avutil/rational: Check that av_reduce() returns values within the requested max
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Clément Bœsch
56e432b27b
avutil/atomic: reuse ret to avoid dereferencing twice the same value.
10 years ago
Michael Niedermayer
05e74ac2f3
avutil/hmac: use av_freep() to avoid leaving stale pointers in memory
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
6d639ecf44
avutil/audio_fifo: use av_freep() to avoid leaving stale pointers in memory
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
336bb3f706
avutil/dict: Use av_freep() to avoid leaving stale pointers in memory
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
649c158e8c
Add FFMPEG_VERSION into the binary libs
...
This simplifies identifying from which revision a binary of a lib came from
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Supraja Meedinti
4e1ecfe214
libavutil: Added cbc mode to cast128
...
Signed-off-by: Supraja Meedinti <supraja0493@gmail.com>
Previous version reviewed-by: Giorgio Vazzana <mywing81@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Vittorio Giovara
b1306823d0
check memory errors from av_strdup()
10 years ago
Luca Barbato
5d839778b9
lavu: Refactor side data wiping
...
And make sure the nb_side_data field is reset as well.
Based on an initial patch from wm4 <nfxjfg@googlemail.com>.
CC: libav-stable@libav.org
10 years ago
Supraja Meedinti
abbcc68e5c
libavutil: cosmetic: inserted spaces wherever necessary
...
Signed-off-by: Supraja Meedinti <supraja0493@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
wm4
a400edbb6d
lavu/frame: fix malloc error path in av_frame_copy_props()
...
The error path frees all side data, but forgets to reset the side data
count. This can blow up later in av_frame_unref() and free_side_data().
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Anton Khirnov
e10e6651b5
thread: use "" instead of <> for including the w32pthreads wrapper
...
Found-by: Dave Yeo <dave.r.yeo@gmail.com>
10 years ago
wm4
a963fdb0ea
lavu/dict: check for malloc failures
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Martin Storsjö
780cd20b00
aarch64: Use .data.rel.ro for const data with relocations
...
This reverts commit c00365b46d
in addition to using a different section.
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years ago
Martin Storsjö
f963f80399
arm: Use .data.rel.ro for const data with relocations
...
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years ago
Michael Niedermayer
41a52740d4
avutil/opt: Fix AV_OPT_TYPE_BINARY case in av_opt_is_set_to_default()
...
Fixes CID1257010
Reviewed-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
ace9161655
avutil/opt: Check av_parse_video_rate()s return value
...
Fixes CID1257008
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
eb74839caa
avutil/opt: Check av_parse_color() return value
...
Fixes: CID1257007
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
890d8f44fd
avutil/buffer: add #if USE_ATOMICS around atomics specific functions to ensure sync types arent mixed by mistake
...
Fixes CID1257011
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Kieran Kunhya
9a738c27dc
v210enc: Add SIMD optimised 8-bit and 10-bit encoders
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
10 years ago
Michael Niedermayer
5bf4cd8e5b
avutil/ppc/util_altivec: add () to VEC_SPLAT16 macro
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
c299b6fd08
avutil/buffer: Move USE_ATOMICS to thread.h to avoid it becoming out of sync with it
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Dave Yeo
32eadfe453
libavutil/threads.h: correct an include to be local
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Dave Yeo
090a7801a8
libavutil/thread.h: Support OS/2 threads
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Vadim Kalinsky
2db29482f1
avutil/bprint: C++ compatible AVBPrint definition.
...
Previous version reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Lukasz Marek
0cb994dfe3
lavu/opt: add escaping to av_opt_serialize
...
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
10 years ago
Lukasz Marek
f00e9c4b10
lavu/opt: add consts where possible
10 years ago
Stefano Sabatini
29208e6dcf
lavu/imgutils: remove redundant and wrong check in av_image_fill_arrays
10 years ago
wm4
fbd6c97f9c
lavu: fix memory leaks by using a mutex instead of atomics
...
The buffer pool has to atomically add and remove entries from the linked
list of available buffers. This was done by removing the entire list
with a CAS operation, working on it, and then setting it back again
(using a retry-loop in case another thread was doing the same thing).
This could effectively cause memory leaks: while a thread was working on
the buffer list, other threads would allocate new buffers, increasing
the pool's total size. There was no real leak, but since these extra
buffers were not needed, but not free'd either (except when the buffer
pool was destroyed), this had the same effects as a real leak. For some
reason, growth was exponential, and could easily kill the process due
to OOM in real-world uses.
Fix this by using a mutex to protect the list operations. The fancy
way atomics remove the whole list to work on it is not needed anymore,
which also avoids the situation which was causing the leak.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
10 years ago
Anton Khirnov
2443e522f0
lavu: add wrappers for the pthreads mutex API
...
Also add no-op fallbacks when threading is disabled.
This helps keeping the code clean if Libav is compiled for targets
without threading. Since we assume that no threads of any kind are used
in such configurations, doing nothing is ok by definition.
Based on a patch by wm4 <nfxjfg@googlemail.com>.
10 years ago
Matthew Oliver
0167fa0060
msvc: Fix compilation errors due to header include order.
...
Ensures that the header include order is such that winsock2.h is always
included before windows.h or that windows.h does not include winsock.h.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Rong Yan
22e557917d
libavutil/ppc/util_altivec.h : fix load_with_perm_vec() add marcos vcswapi2s() vcswapc() VEC_SPLAT16() VEC_SLD16() for POWER LE
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Martin Storsjö
9326d64ed1
Share the utf8 to wchar conversion routine between lavf and lavu
...
This doesn't add any dependency on library internals, since this
only is a static inline function that gets built into each of the
calling functions - this is only to reduce the code duplication.
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years ago
Kieran Kunhya
36091742d1
v210enc: Add SIMD optimised 8-bit and 10-bit encoders
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Lukasz Marek
ea0d893817
lavu/opt: handle NULL obj in av_opt_next
...
It indirectly also fixes av_opt_free for NULL objs.
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
10 years ago
Michael Niedermayer
b4d8724ab2
avutil/file: fix av_tempfile() documentation
...
Found-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Vittorio Giovara
277ff7f5dc
lavu: move internal define to the only places where it is used
10 years ago
Michael Niedermayer
5182a2a235
avutil: remove FF_CONST_AVUTIL53, its no longer needed
...
version is 54 already
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Lukasz Marek
ab922f9ef1
lavu/dict: add av_dict_get_string
...
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
10 years ago
jessejiang
29d208d5d4
avutil/arm/float_dsp_init_vfp: replace restrict by av_restrict
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
a54a51cc9b
avutil/float_dsp: add avpriv_float_dsp_alloc()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Lukasz Marek
bee5844ddd
lavu/opt: introduce av_opt_serialize()
...
Function allows to create string containing object's serialized options.
Such string may be passed back to av_set_options_string() in order to restore options.
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
10 years ago