Commit Graph

2479 Commits

Author SHA1 Message Date
Michael Niedermayer 8e944891ce avutil/buffer: remove redundant memory poisoning
Found-by: ubitux
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-24 02:21:42 +01:00
Michael Niedermayer 058c002932 avutil/buffer: support memory poisoning
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-24 01:44:48 +01:00
Michael Bradshaw 2a97c5915b Make audio FIFO read/write contracts more strict
Signed-off-by: Michael Bradshaw <mjbshaw@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-23 13:33:45 +01:00
Michael Niedermayer 6efe61486d Merge commit '1e8b9738fa70e20967ddb542d2f9d5552fc51ec6'
* commit '1e8b9738fa70e20967ddb542d2f9d5552fc51ec6':
  avutil/frame: add all remaining frame properties to av_frame_copy_props

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-23 12:08:01 +01:00
Hendrik Leppkes 1e8b9738fa avutil/frame: add all remaining frame properties to av_frame_copy_props
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-03-22 20:05:37 +01:00
Clément Bœsch 77f60f0011 lavu/eval: add between() function. 2013-03-22 09:20:45 +01:00
Nicolas George 8d928a9d99 lavu/opt: add AV_OPT_TYPE_DURATION. 2013-03-20 21:04:28 +01:00
Michael Niedermayer 9ea6c14820 Merge remote-tracking branch 'cigaes/master'
* cigaes/master:
  lavu/frame: use channels rather than channel_layout.
  lavf: avformat_seek_file(): validate stream_index.
  lavf/concatdec: fix possible leak in case of malloc failure.
  lavfi/buffersink: check av_frame_ref() failure.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-20 13:58:04 +01:00
Michael Niedermayer b274703493 avutil/atomic: use av_assert0()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-20 13:45:30 +01:00
Michael Niedermayer eaa5882e71 avutil: fix compilation
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-20 13:45:30 +01:00
Nicolas George a964d6a8a2 lavu/frame: use channels rather than channel_layout. 2013-03-20 13:35:24 +01:00
Paul B Mahol 7aa9af51db lavu/opt: add AV_OPT_VIDEO_RATE option
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-03-20 12:29:54 +00:00
Michael Niedermayer 17ebef2fc8 Merge commit '2c328a907978b61949fd20f7c991803174337855'
* commit '2c328a907978b61949fd20f7c991803174337855':
  pixdesc: add a function for counting planes in a pixel format.
  avplay: remove the -debug option.
  Revert "asfenc: return error on negative timestamp"

Conflicts:
	doc/APIchanges
	doc/ffplay.texi
	ffplay.c
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-20 11:24:11 +01:00
Michael Niedermayer f1c3d8b344 avutil/add_to_pool: remove unused assgnment
Fixed CID991859
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-19 13:35:10 +01:00
Anton Khirnov 2c328a9079 pixdesc: add a function for counting planes in a pixel format. 2013-03-19 11:12:17 +01:00
Michael Niedermayer 6128d33946 AVFrame.pkt_dts: improve docs
Related to Ticket2375

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-19 00:47:00 +01:00
Michael Niedermayer cea3a63ba3 avutil/buffer: Fix race in pool.
This race will always happen sooner or later in a multi-threaded
environment and it will over time lead to OOM.
This fix works by spinning, there are other ways by which this
can be fixed, like simply detecting the issue after it happened
and freeing the over-allocated memory or simply using a mutex.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-18 19:19:22 +01:00
Clément Bœsch 6abb554fd6 lavc,lavu: fix two doxy mixup between h/v chroma shift. 2013-03-18 09:04:11 +01:00
Michael Niedermayer fbd3ee91a5 avutil/frame: typo
found by ubitux
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-18 04:47:27 +01:00
Michael Niedermayer 3dc25c3ab2 avutil/frame: document alignment and padding requirements
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-18 04:13:21 +01:00
Michael Niedermayer c603f22683 avutil/get_pool: remove dead operations whichs result is never used.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-17 18:40:15 +01:00
Michael Niedermayer e3be7b1159 avutil/get_pool: Remove redundant initial atomic operation
602->442 dezicycles

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-17 18:40:15 +01:00
Michael Niedermayer f566ac48ce avutil/frame: fix video buffer allocation
The padding was lost during porting from avcodec
Should fix out of array accesses

Found-by: ubitux
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-17 02:19:25 +01:00
Stefano Sabatini b2098d2417 lavu/eval: add bitor and bitand functions
Warning note suggested by Reimar.
2013-03-17 00:22:47 +01:00
Michael Niedermayer 7fff5781b6 Merge commit 'e4a7b2177d14678ae240edcabaacfe2b14619b7b'
* commit 'e4a7b2177d14678ae240edcabaacfe2b14619b7b':
  vf_showinfo: remove its useless init function
  AVOptions: fix using named constants with child contexts.

Conflicts:
	libavutil/opt.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-16 16:38:11 +01:00
Michael Niedermayer aef816f957 Merge commit 'ca6c3f2c53be70aa3c38e8f1292809db89ea1ba6'
* commit 'ca6c3f2c53be70aa3c38e8f1292809db89ea1ba6':
  lzo: fix overflow checking in copy_backptr()
  flacdec: simplify bounds checking in flac_probe()
  atrac3: avoid oversized shifting in decode_bytes()

Conflicts:
	libavformat/flacdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-16 14:10:09 +01:00
Anton Khirnov 4d67ff8e8e AVOptions: fix using named constants with child contexts.
The named constant needs to be searched for in the same object on which
the option is set, i.e. target_obj.
2013-03-16 05:35:33 +01:00
Anton Khirnov 9676b9a2cd AVOption: remove an unused function parameter. 2013-03-16 05:35:20 +01:00
Xi Wang ca6c3f2c53 lzo: fix overflow checking in copy_backptr()
The check `src > dst' in the form `&c->out[-back] > c->out' invokes
pointer overflow, which is undefined behavior in C.

Remove the check.  Also replace `&c->out[-back] < c->out_start' with
a safe form `c->out - c->out_start < back' to avoid overflow.

CC: libav-stable@libav.org

Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-03-15 12:52:31 +01:00
Michael Niedermayer caff888183 avutil/frame: add AVBufferRef for qp table
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-15 03:02:27 +01:00
Michael Niedermayer 905e7eb413 Merge commit 'f099d3d1d5466bd63f4ab36270d169ff9ea613b8'
* commit 'f099d3d1d5466bd63f4ab36270d169ff9ea613b8':
  Add av_log_{ask_for_sample|missing_feature} replacements to libavutil
  ismindex: Check the return value of allocations

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-14 12:15:02 +01:00
Diego Biurrun f099d3d1d5 Add av_log_{ask_for_sample|missing_feature} replacements to libavutil
This allows reporting missing features and requesting samples from
all libraries in a standard way; with a simplified API.
2013-03-13 20:42:06 +01:00
Hendrik Leppkes febd78e904 lavu/frame: free frame metadata when unrefing a frame.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-13 20:16:49 +01:00
Hendrik Leppkes e4c5e08f60 lavu/frame: av_frame_make_writable: set the channels on the new frame.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-13 16:00:43 +01:00
Hendrik Leppkes 2035cc3595 lavu/frame: copy all frame properties in av_frame_copy_props
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-13 16:00:28 +01:00
Carl Eugen Hoyos f1b716c79b avframe: Copy buffer type in copy_props.
Fixes VDPAU decoding with MPlayer.
2013-03-13 13:05:42 +01:00
Michael Niedermayer 150de78d7c Merge commit 'd6d369bf1370999896500ae7eb5b9447ab635a3d'
* commit 'd6d369bf1370999896500ae7eb5b9447ab635a3d':
  atomic: prefer gcc builtins over win32 atomics, if available.
  avframe: copy reordered_opaque in copy_props

Conflicts:
	libavutil/frame.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-13 02:08:41 +01:00
Michael Niedermayer 0d0f76ea56 Merge commit '6327c10702922eabcb1c6170abd3f03d23ce4c51'
* commit '6327c10702922eabcb1c6170abd3f03d23ce4c51':
  atomic: fix CAS with armcc.
  png: use av_mallocz_array() for the zlib zalloc function
  libmp3lame: use the correct remaining buffer size when flushing

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-12 21:39:38 +01:00
Michael Niedermayer d64b854075 Merge commit '666fe5da47d127074be7f0e2bac93db6af8b4a30'
* commit '666fe5da47d127074be7f0e2bac93db6af8b4a30':
  atomic: Exclude the unsupported implementation headers from checkheaders
  avconv: do not silently ignore unused codec AVOptions.

Conflicts:
	ffmpeg_opt.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-12 21:34:24 +01:00
Ronald S. Bultje 6a701306db dsputil: make selectable.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-12 19:56:58 +01:00
Michael Niedermayer 0cfbfaaa12 Merge commit '7b89cd20d844cbe763ca34e63e99d110043cf241'
* commit '7b89cd20d844cbe763ca34e63e99d110043cf241':
  eamad: allocate a dummy reference frame when the real one is missing
  Replace remaining includes of audioconvert.h with channel_layout.h
  Replace some forgotten instances of PIX_FMT_* with AV_PIX_FMT_*.

Conflicts:
	libavcodec/h264.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-12 15:44:15 +01:00
Michael Niedermayer b2cd0d709a Merge commit '8df23e938b4022d6e6e9e1180ea6418abae74fda'
* commit '8df23e938b4022d6e6e9e1180ea6418abae74fda':
  lavc: postpone the removal of request_channels API.
  AVFrame: deprecate all now unused fields

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-12 14:46:41 +01:00
Clément Bœsch 80661e0f55 buffer: use the atomic get instead of the add and fetch variant. 2013-03-12 12:12:49 +01:00
Michael Niedermayer 1ad542f11f get_video_buffer: add vertical padding
Fix memory corruption

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-12 11:33:43 +01:00
Hendrik Leppkes b91459e565 atomic: prefer gcc builtins over win32 atomics, if available.
The mingw win32 atomics appear to be faulty, so they should not be used
if the gcc ones are available.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-03-12 10:41:09 +01:00
Martin Storsjö c48828f763 atomic: Check for __sync_val_compare_and_swap instead of __sync_synchronize
Not all gcc configurations have an implementation of all the atomic
operations, and some gcc configurations have some atomic builtins
implemented but not all.

Thus check for the most essential function, whose presence should
indicate that all others are present as well, since it can be used
to implement all the other ones.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-03-12 10:41:02 +01:00
Hendrik Leppkes d6d369bf13 atomic: prefer gcc builtins over win32 atomics, if available.
The mingw win32 atomics appear to be faulty, so they should not be used
if the gcc ones are available.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-03-11 16:57:25 +02:00
Janne Grunau fc8406d01e avframe: copy reordered_opaque in copy_props
Fixes video playback in applications still using reordered_opaque.
2013-03-11 13:29:39 +01:00
Fabrizio Gennari 91b747ac78 mem: Fix usage of memalign() on DJGPP.
Credits to Khusraw of bttr-software.de forum.
Signed-off-by: Carl Eugen Hoyos <cehoyos@ag.or.at>
2013-03-10 11:12:56 +01:00
Clément Bœsch e53061154f lavu/frame: fix not/note typo in doxy. 2013-03-10 02:07:34 +01:00