This code is intended for errors in external libraries
when no corresponding error code can be found.
AVERROR_UNKNOWN is too vague for that and looks like AVERROR_BUG.
intfloat.h is a public header, and is now (since a1245d5ca) included
by mathematics.h, which many external callers include.
This fixes building third party applications that include
mathematics.h in a language that doesn't support designated
initalizers.
Signed-off-by: Martin Storsjö <martin@martin.st>
These files use NAN/INFINITY but didn't include mathematics.h to get
the fallback definitions if the system lacks the macros.
Signed-off-by: Martin Storsjö <martin@martin.st>
Some compilers, MSVC among them, don't recognize the divisions by
zero as meaning infinity/nan.
These macros should, according to the standard, expand to constant
expressions, but this shouldn't matter for our usage.
Signed-off-by: Martin Storsjö <martin@martin.st>
This adds macros for accessing the EFLAGS register and uses
these instead of coding the entire check in inline asm.
Signed-off-by: Mans Rullgard <mans@mansr.com>
This creates proper position independent code when accessing
data symbols if CONFIG_PIC is set.
References to external symbols should now use the movrelx macro.
Some additional code changes are required since this macro may
need a register to hold the GOT pointer.
Signed-off-by: Mans Rullgard <mans@mansr.com>
unistd.h is used for open/read/close, but if this header does not
exist, there's probably no use in trying to open /dev/*random
at all.
Signed-off-by: Martin Storsjö <martin@martin.st>
The blue is difficult to read on several peoples terminals with black background.
Idea-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This adds a fallback for cbrtf() using powf(x, 1/3). Since
powf() with a non-integer exponent requires a non-negative
base, special handling of negative inputs is needed.
Signed-off-by: Mans Rullgard <mans@mansr.com>
Move the lavc/imgconvert functions and rename them as follows:
avpicture_get_size -> av_image_get_buffer_size()
avpicture_fill -> av_image_fill_arrays()
avpicture_layout -> av_image_copy_to_buffer()
The new functions have an align parameter, which allows to define the
linesize alignment assumed in the buffer (which is set or read).
The names of the functions are consistent with the lavu/samples API
(av_samples_get_buffer_size(), av_samples_fill_arrays()).
This is required for isatty, which exists on MSVC and is found by
configure, but is provided by io.h instead of unistd.h.
Signed-off-by: Martin Storsjö <martin@martin.st>
This adds whitespace around operators, aligns line continuation
backslashes, and breaks long lines. Also fixes an ifdef halfway
through a statement. The one line of duplication this saved is
not worth the ugliness.
Signed-off-by: Mans Rullgard <mans@mansr.com>
MSVC has isatty (in io.h), but not unistd.h. (isatty isn't called
at all for windows, since there's a special case block for that.)
Signed-off-by: Martin Storsjö <martin@martin.st>
The string passed to av_vlog() from libx264's X264_log overflows the 512
byte part_size, truncating x264 parameter output. Double this size
and put it in a #define so it only needs to be changed in one place.
Signed-off-by: Wolfram Gloger <video06@malloc.de>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This function implements a delay using the first available
of the following functions:
- nanosleep()
- usleep()
- Sleep() (Windows)
The conditional #includes in time.c are simplified by including
unistd.h and windows.h whenever they are available rather than
having these lines triggered by specific functions.
Signed-off-by: Mans Rullgard <mans@mansr.com>
This reverts commit a2b186a188.
The defines were present for several years, removing
them without a version bump may break API.
(Fixes MPlayer compilation.)
The unistd.h header is only needed for the close() declaration.
If this header is not available, the close() declaration may be
provided by another header, e.g. io.h.
Signed-off-by: Mans Rullgard <mans@mansr.com>
The only symbol this file uses from unistd.h is isatty(). By
including the header only when this function is used, the file
can be built on systems without unistd.h (which presumably also
lack isatty).
Signed-off-by: Mans Rullgard <mans@mansr.com>
Libav.org has removed this while moving the code around
For reference, the code was originally added in:
commit 9aeeeb63f7
Author: Fabrice Bellard <fabrice@bellard.org>
Date: Wed Dec 20 00:02:47 2000 +0000
Initial revision
Originally committed as revision 2 to svn://svn.ffmpeg.org/ffmpeg/trunk
--
The function name originates from:
commit 9498853132
Author: Fabrice Bellard <fabrice@bellard.org>
Date: Thu Jul 25 16:01:46 2002 +0000
more consistent naming
Originally committed as revision 802 to svn://svn.ffmpeg.org/ffmpeg/trunk
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
While these defines are not defined by the C standard they are
standardized as X/Open System Interfaces Extension. We use the
appropiate _XOPEN_SOURCE define to make them available. They
seem to be available on all FATE configs since the constants
are used in files where mathematics.h is not included.