aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/wma.h
diff options
context:
space:
mode:
authorGanesh Ajjanagadde <gajjanagadde@gmail.com>2015-11-14 19:52:57 -0500
committerGanesh Ajjanagadde <gajjanagadde@gmail.com>2015-11-21 08:51:49 -0500
commit14ea4151d7c3c26500193f11ac661ed20c7c2b9c (patch)
tree59bce32eb0c8282ceaac789af16ebd1a83c876c6 /libavcodec/wma.h
parent8ffb3f08c6d44fe9ce7076288b1cd63edc56dad7 (diff)
downloadffmpeg-14ea4151d7c3c26500193f11ac661ed20c7c2b9c.tar.gz
avutil/libm: correct isnan, isinf compat hacks
isnan and isinf are actually macros as per the standard. In particular, the existing implementation has incorrect signature. Furthermore, this results in undefined behavior for e.g double values outside float range as per the standard. This patch corrects the undefined behavior for all usage within FFmpeg. Note that long double is not handled as it is not used in FFmpeg. Furthermore, even if at some point long double gets used, it is likely not needed to modify the macro in practice for usage in FFmpeg. See below for analysis. Getting long double to work strictly per the spec is significantly harder since a long double may be an IEEE 128 bit quad (very rare), 80 bit extended precision value (on GCC/Clang), or simply double (on recent Microsoft). On the other hand, any potential future usage of long double is likely for precision (when a platform offers extra precision) and not for range, since the range anyway varies and is not as portable as IEEE 754 single/double precision. In such cases, the implicit cast to a double is well defined and isinf and isnan should work as intended. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Diffstat (limited to 'libavcodec/wma.h')
0 files changed, 0 insertions, 0 deletions