Commit Graph

3452 Commits

Author SHA1 Message Date
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>
2014-12-19 19:32:40 +01:00
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>
2014-12-19 14:35:29 +01:00
Michael Niedermayer
988d27b802 Merge commit 'b1306823d0b3ae998c8e10ad832004eb13bdd93e'
* commit 'b1306823d0b3ae998c8e10ad832004eb13bdd93e':
  check memory errors from av_strdup()

Conflicts:
	avprobe.c
	libavformat/matroskaenc.c
	libavutil/opt.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-19 04:57:25 +01:00
Michael Niedermayer
bce06eb059 Merge commit '5d839778b9f3edb682b7f71dde4f80f07c75b098'
* commit '5d839778b9f3edb682b7f71dde4f80f07c75b098':
  lavu: Refactor side data wiping

Conflicts:
	libavutil/frame.c

See: a400edbb6d
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-19 03:57:59 +01:00
Vittorio Giovara
b1306823d0 check memory errors from av_strdup() 2014-12-18 23:27:14 +01:00
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
2014-12-18 23:22:59 +01:00
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>
2014-12-17 02:18:02 +01:00
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>
2014-12-15 04:46:30 +01:00
Anton Khirnov
e10e6651b5 thread: use "" instead of <> for including the w32pthreads wrapper
Found-by: Dave Yeo <dave.r.yeo@gmail.com>
2014-12-14 18:15:57 +01:00
wm4
a963fdb0ea lavu/dict: check for malloc failures
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-12 23:40:50 +01:00
Michael Niedermayer
92d47e2aa3 Merge commit '780cd20b00a69e26bbfffbb8eec16fbe999ea793'
* commit '780cd20b00a69e26bbfffbb8eec16fbe999ea793':
  aarch64: Use .data.rel.ro for const data with relocations

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-09 12:08:29 +01:00
Michael Niedermayer
16e65419ed Merge commit 'f963f80399deb1a2b44c1bac3af7123e8a0c9e46'
* commit 'f963f80399deb1a2b44c1bac3af7123e8a0c9e46':
  arm: Use .data.rel.ro for const data with relocations

Conflicts:
	configure

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-09 11:58:13 +01:00
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>
2014-12-09 11:43:31 +02:00
Martin Storsjö
f963f80399 arm: Use .data.rel.ro for const data with relocations
Signed-off-by: Martin Storsjö <martin@martin.st>
2014-12-09 11:43:25 +02:00
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>
2014-12-08 15:39:17 +01:00
Michael Niedermayer
ace9161655 avutil/opt: Check av_parse_video_rate()s return value
Fixes CID1257008

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-07 02:57:39 +01:00
Michael Niedermayer
eb74839caa avutil/opt: Check av_parse_color() return value
Fixes: CID1257007

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-07 02:46:25 +01:00
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>
2014-12-06 20:47:41 +01:00
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>
2014-12-05 13:03:49 +00:00
Michael Niedermayer
5bf4cd8e5b avutil/ppc/util_altivec: add () to VEC_SPLAT16 macro
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-29 13:40:33 +01:00
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>
2014-11-29 12:26:22 +01:00
Dave Yeo
32eadfe453 libavutil/threads.h: correct an include to be local
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-29 11:56:28 +01:00
Dave Yeo
090a7801a8 libavutil/thread.h: Support OS/2 threads
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-29 11:56:22 +01:00
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>
2014-11-29 03:51:35 +01:00
Lukasz Marek
0cb994dfe3 lavu/opt: add escaping to av_opt_serialize
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
2014-11-29 00:58:42 +01:00
Michael Niedermayer
6db8cd8f37 Merge commit 'fbd6c97f9ca858140df16dd07200ea0d4bdc1a83'
* commit 'fbd6c97f9ca858140df16dd07200ea0d4bdc1a83':
  lavu: fix memory leaks by using a mutex instead of atomics

Conflicts:
	libavutil/buffer.c

The atomics code is left in place as a fallback for synchronization in the
absence of p/w32 threads. Our ABI did not requires applications to
only use threads (and matching ones) to what libavutil was build with
Our code also was not affected by the leak this change fixes, though
no question the atomics based implementation is not pretty at all.
First and foremost the code must work, being pretty comes after that.

If this causes problems, for example when libavutil is used by multiple
applications each using a different kind of threading system then the
default possibly has to be changed to the uglier atomics.

See: cea3a63ba3
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-27 23:42:16 +01:00
Lukasz Marek
f00e9c4b10 lavu/opt: add consts where possible 2014-11-27 23:27:14 +01:00
Michael Niedermayer
4760278007 Merge commit '2443e522f0059176ff8717c9c753eb6fe7e7bbf1'
* commit '2443e522f0059176ff8717c9c753eb6fe7e7bbf1':
  lavu: add wrappers for the pthreads mutex API

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-27 22:08:17 +01:00
Stefano Sabatini
29208e6dcf lavu/imgutils: remove redundant and wrong check in av_image_fill_arrays 2014-11-27 14:24:16 +01:00
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>
2014-11-27 13:36:00 +01:00
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>.
2014-11-27 13:36:00 +01:00
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>
2014-11-27 12:40:18 +01:00
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>
2014-11-27 12:07:19 +01:00
Michael Niedermayer
097de4d1d6 Merge commit '9326d64ed1baadd7af60df6bbcc59cf1fefede48'
* commit '9326d64ed1baadd7af60df6bbcc59cf1fefede48':
  Share the utf8 to wchar conversion routine between lavf and lavu

Conflicts:
	libavformat/os_support.h
	libavutil/file_open.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-27 11:10:26 +01:00
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>
2014-11-27 09:29:17 +02:00
Kieran Kunhya
36091742d1 v210enc: Add SIMD optimised 8-bit and 10-bit encoders
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-26 20:30:47 +01:00
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>
2014-11-25 23:09:16 +01:00
Michael Niedermayer
932d8d790c Merge commit '277ff7f5dc134f1c2dfc4ea0ef3540340482e3d2'
* commit '277ff7f5dc134f1c2dfc4ea0ef3540340482e3d2':
  lavu: move internal define to the only places where it is used

Conflicts:
	libavcodec/h264_cabac.c
	libavutil/internal.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-24 12:45:07 +01:00
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>
2014-11-24 04:59:02 +01:00
Vittorio Giovara
277ff7f5dc lavu: move internal define to the only places where it is used 2014-11-24 01:30:14 +00:00
Michael Niedermayer
5182a2a235 avutil: remove FF_CONST_AVUTIL53, its no longer needed
version is 54 already

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-24 02:22:19 +01:00
Lukasz Marek
ab922f9ef1 lavu/dict: add av_dict_get_string
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
2014-11-21 01:25:54 +01:00
jessejiang
29d208d5d4 avutil/arm/float_dsp_init_vfp: replace restrict by av_restrict
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-20 11:17:42 +01:00
Michael Niedermayer
a54a51cc9b avutil/float_dsp: add avpriv_float_dsp_alloc()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-18 11:43:01 +01:00
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>
2014-11-16 01:13:38 +01:00
Lukasz Marek
eec693328a lavu/opt: introduce av_opt_is_set_to_default()
New function allows to check if option is set to its default value

Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
2014-11-16 01:13:38 +01:00
Lukasz Marek
173d51c982 lavu/opt: fix av_opt_get function
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
2014-11-12 23:34:05 +01:00
Lukasz Marek
5dc0f607e7 lavu/opt: fix memleak in test
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
2014-11-12 23:32:31 +01:00
Michael Niedermayer
1e16492b98 Merge commit 'c6074a30ba3b5fb4319ee6ee599656d58548cdc8'
* commit 'c6074a30ba3b5fb4319ee6ee599656d58548cdc8':
  opt: Fix the documentation mentioning av_set_string3

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-11 23:54:52 +01:00
Lukasz Marek
b54effba4f lavu/opt: update tests
In general this commit prepares opt tests to be added to fate.

The commit set some non-zero defaults for test options.
It allows to check if defaults are really set.

Added printing of default values.

Added more cases for testing av_set_options_string

Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
2014-11-11 21:52:26 +01:00