This ensures that applications that call avutil_version() often
would not run the checls every time
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avpriv_request_sample() and avpriv_report_missing_feature() were printing bogus values for the extra arguments.
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Add av_int_list_length() to compute a list length.
Add av_opt_set_int_list() to set a binary option.
Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* commit 'bcc94328980e6c56546792ab08b0756abdce310b':
opt: check the return values of av_get_token for ENOMEM.
doc: Fix best_nb_channells typo
matroska: pass the lace size to the matroska_parse_rm_audio
Conflicts:
libavformat/matroskadec.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Split long lines, reindent code, add missing spaces between operators,
remove possibly confusing comment from av_opencl_buffer_read_image()
doxy, and use designated initializers for openclutils_class.
* commit 'cf53704c55378cc0dcfc16637cdac7d58f0b3107':
AVOptions: make av_set_options_string() forward options to child objects
win32: Use 64-bit fstat/lseek variants for MSVC as well
win32: Make ff_win32_open more robust
Conflicts:
libavformat/os_support.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit '1e8b9738fa70e20967ddb542d2f9d5552fc51ec6':
avutil/frame: add all remaining frame properties to av_frame_copy_props
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* 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>
* 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>
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>
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>
* 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>
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>
* 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>
* 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>
* 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>
* 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>
* commit '8df23e938b4022d6e6e9e1180ea6418abae74fda':
lavc: postpone the removal of request_channels API.
AVFrame: deprecate all now unused fields
Merged-by: Michael Niedermayer <michaelni@gmx.at>
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>
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>
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>
On the current code, armcc will fail with:
"libavutil/atomic_gcc.h", line 52: Error: #2771: first argument must be
a pointer to integer or enumeration type
This makes them pass standalone compilation tests. Previously,
they included atomic.h which included themselves again, leading to
double definitions.
Signed-off-by: Martin Storsjö <martin@martin.st>
* commit '7ecc2d403ce5c7b6ea3b1f368dccefd105209c7e':
Move AVFrame from lavc to lavu.
Conflicts:
libavcodec/avcodec.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit '8e401dbe90cc77b1f3067a917d9fa48cefa3fcdb':
lavu: add a new API for reference-counted data buffers.
Conflicts:
libavutil/Makefile
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit '65f1d45dcc71186ede72fff950996099d23359bd':
lavu: add support for atomic operations.
Conflicts:
configure
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit '4be368b504c6f4a03051448728fc62cd0ed506b2':
avstring: Fix isxdigit to not accept non-hex characters
configure: Add missing videodsp dependencies to some decoders
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit 'efa7f4202088c70caba11d7834641bc6eaf41830':
Use the avstring.h locale-independent character type functions
avstring: Add locale independent versions of some ctype.h functions
Conflicts:
avprobe.c
doc/APIchanges
libavcodec/dvdsubdec.c
libavcodec/utils.c
libavutil/avstring.c
libavutil/avstring.h
libavutil/eval.c
libavutil/parseutils.c
libavutil/version.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
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>
This makes them pass standalone compilation tests. Previously,
they included atomic.h which included themselves again, leading to
double definitions.
Signed-off-by: Martin Storsjö <martin@martin.st>
These could be used for reference counting, or for keeping track of
decoding progress in references in multithreaded decoders.
Support is provided by gcc/msvc/suncc intrinsics, with a fallback using
pthread mutexes.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
The escape API will be useful to perform escaping programmatically, which
is required when crafting argument strings, and will be used for context
printing as well.
This is based on the ffescape tool code, with a few extensions and fixes.
As far as I can tell the code should not change behaviour
depending on locale in any of these places.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* commit '9d4da474f5f40b019cb4cb931c8499deee586174':
lls: move to the private namespace
Conflicts:
libavutil/version.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit 'f935aca44c674d30e3ed940ef73bbad1228a5855':
av_memcpy_backptr: avoid an infinite loop for back = 0
4xm: check the return value of read_huffman_tables().
Conflicts:
libavcodec/4xm.c
libavutil/mem.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
The "CentaurHauls family 6 model 9 stepping 8" family of CPUs
(flags: fpu vme de pse tsc msr cx8 sep mtrr pge mov pat mmx fxsr sse
up rng rng_en ace ace_en) SIGILLs on long nop codes.
Signed-off-by: Martin Storsjö <martin@martin.st>
internal.h doesn't need to include cpu.h anymore since
the relevant code was moved to x86/emms.h
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* commit '4db96649ca700db563d9da4ebe70bf9fc4c7a6ba':
avutil: Ensure that emms_c is always defined, even on non-x86
configure: Move MinGW CPPFLAGS setting to libc section, where it belongs
avutil: Move emms code to x86-specific header
Conflicts:
configure
libavutil/internal.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* qatar/master:
lavu: avoid clashing definition of E
doc: developer: Add a note about reserved system name space
Conflicts:
libavutil/internal.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit '62a43d30cc3b9b2460f2c926beb522df32493625':
crc: Move static data table from header to .c file
avcodec/rectangle: Remove nonsense assert
Conflicts:
libavcodec/rectangle.h
libavutil/crc_data.h
The assert is not removed as the assert ensures clear and easy
to debug failures instead of undefined behavior in case of
misalignment.
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit '375ef6528c9dd2db7f9881e232cb0ec3aa16970d':
libfdk-aacenc: Actually check for upper bounds of cutoff
arm: Fall back to runtime cpu feature detection via /proc/cpuinfo
Merged-by: Michael Niedermayer <michaelni@gmx.at>
The "CPU: CentaurHauls family 6 model 9 stepping 8" family of CPUs
(flags: fpu vme de pse tsc msr cx8 sep mtrr pge mov pat mmx fxsr sse
up rng rng_en ace ace_en) SIGILLs on long nop codes.
Change-Id: I7e7c52a2191006df30a9aadbc40d481a1db89106
On recent android versions, /proc/self/auxw is unreadable
(unless the process is running running under the shell uid or
in debuggable mode, which makes it hard to notice). See
http://b.android.com/43055 and
https://android-review.googlesource.com/51271 for more information
about the issue.
This makes sure e.g. neon optimizations are enabled at runtime in
android apps even when built in release mode, if configured to
use the runtime detection.
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
Memory passed to av_realloc must come from malloc,
calloc or realloc, and not e.g. memalign. realloc(3):
The realloc() function changes the size of the memory block pointed to
by ptr to size bytes. (...) Unless ptr is NULL, it must have been
returned by an earlier call to malloc(), calloc() or realloc().
The issue has been found by debugallocation, a part of google-perftools:
http://code.google.com/p/gperftools/ .
This makes fate pass when using LD_PRELOAD-ed debugallocation.
See also earlier discussion
http://ffmpeg.org/pipermail/ffmpeg-devel/2013-January/137234.html
Signed-off-by: Paweł Hajdan, Jr <phajdan@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This makes sure that the restrict keyword is mapped to whatever
keyword the compiler prefers/supports. This fixes building on MSVC
(and possibly on GCC 2.x as well).
Signed-off-by: Martin Storsjö <martin@martin.st>
Now, nellymoserenc and aacenc no longer depends on dsputil. Independent
of this patch, wmaprodec also does not depend on dsputil, so I removed
it from there also.
The function is known to be missing in at least one target (MSVC).
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* qatar/master:
x86: dsputil: Drop some unused macro definitions
x86: Add a Yasm-based emms() replacement
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit 'd633d12b2cc999cee3ac25bf9a810fe7ff03726d':
x86inc: Add cvisible macro for C functions with public prefix
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit 'ef5d41a5534b65f03d02f2e11a503ab8416bfc3b':
x86inc: Rename "program_name" to "private_prefix"
configure: Run SHFLAGS through ldflags_filter()
Conflicts:
configure
Merged-by: Michael Niedermayer <michaelni@gmx.at>
This provides a fallback when building with Yasm enabled, but neither
inline assembly, nor the _mm_empty intrinsic are available or enabled.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
The new name is more descriptive and will allow defining a separate
public prefix for externally visible library symbols.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
* qatar/master:
lavc: Move vector_fmul_window to AVFloatDSPContext
rtpdec_mpeg4: Check the remaining amount of data before reading
Conflicts:
libavcodec/dsputil.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit '0eecafc948b74c247ebbc59f18f508db5d590d0b':
configure: Make the new srtp protocol depend on the rtp protocol
lavf: Add a fate test for the SRTP functions
lavu: Add a fate test for the HMAC API
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit 'dae1d507af94261bafd3b11549884e5d1eca590e':
x86: Add PAVGB macro to abstract pavgb/pavgusb instruction via cpuflags
vf_fps: add final flushed frames to the dropped frame count
rv34_parser: Adjust #if for disabling individual parsers
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit '094a7405e5d8463d7d167d893e04934ec1a84ecd':
x86: ABSB: port to cpuflags
sdp: Include SRTP crypto params if using the srtp protocol
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit 'ab2ad8bd56882c0ea160b154e8b836eb71abc49d':
lavf: Add functions for SRTP decryption/encryption
lavu: Add an API for calculating HMAC (RFC 2104)
Conflicts:
doc/APIchanges
libavutil/version.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit 'd8c772de53d29afb1bada88afa859fce8489c668':
nutdec: Always return a value from nut_read_timestamp()
configure: Make warnings from -Wreturn-type fatal errors
x86: ABS2: port to cpuflags
vdpau: Remove av_unused attribute from function declaration
h264: fix ff_generate_sliding_window_mmcos() prototype.
Conflicts:
configure
libavformat/nutdec.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* qatar/master:
Add version bump and APIchanges entry for Add AV_PIX_FMT_VDPAU.
pixfmt: add picture format for VDPAU
Conflicts:
doc/APIchanges
libavutil/pixfmt.h
libavutil/version.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit '5b4dfbffc258f90a7d2540d21209ac23afcf7cd0':
x86: ABS1: port to cpuflags
v210x: cosmetics, reformat
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Some old gnu assemblers fail to assemble qdadd correctly
Ideally we should check this at build time, but better to
check at run time than mysteriously failing.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* commit '6dd93ee6f1b050ad7c4b247899e83efa293ee405':
hlsenc: check append_entry return value
hlsenc: use the basename to generate the list entries
avstring: add av_basename and av_dirname
Conflicts:
Changelog
doc/APIchanges
libavutil/version.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>