They allow to implement the if/then/else logic, which cannot be
implemented otherwise.
For example the expression:
A*B + not(A)*C
always evaluates to NaN if B is NaN, even in the case where A is 0.
This is the usual weirdness with const/non-const pointers through a function.
See the prototype of strchr for a standard example.
The function had to be moved down, below the point where stdint.h is
indirectly included.
Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
It makes more sense for a bit mask to use an unsigned type.
The change should be source and binary compatible on all
supported systems, hence micro version bump.
Fixes a few invalid shifts.
Signed-off-by: Mans Rullgard <mans@mansr.com>
This is useful, since the normal timegm function isn't a standard
function (requiring _BSD_SOURCE or _SVID_SOURCE on glibc to
be visible, and not available on e.g. windows). The widely available
function mktime uses the local time zone, which requires ugly
workarounds to handle UTC time.
Signed-off-by: Martin Storsjö <martin@martin.st>
Well, probably an ABI breakage at least for 32bit, but hopefully it will go
unnoticed because the fix happened realtively soon.
Signed-off-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
It's a hack which was created to allow for multiple options with
different defaults to refer to same field (e.g. 'b' vs 'ab'). There is
no need for it anymore.
The new function provides a more generic interface than av_fifo_peek()
for peeking at a FIFO buffer data.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Previously the string for AV_CH_LAYOUT_5POINT{0,1}_BACK was the same
of the string for AV_CH_LAYOUT_5POINT{0,1}.
This is required for discerning the two channel layouts, given a
channel layout string.
In commit bebe72f4a0, the enum AV_PICTURE_TYPE_* was introduced. There are still places in the code where pict_type is used as an integer and there is a case where "pict_type = 0" with the explanation "let ffmpeg decide what to do". The new enum does not know a value of 0 and C++ will fail if compiling such programs anyway as it is refered as an int (and you cannot patch them properly).