[FFmpeg-cvslog] mathematics: Don't use division by zero in NAN/INFINITY macros

Alexander Strasser eclipse7 at gmx.net
Mon Jul 2 18:22:19 CEST 2012


Reimar Döffinger wrote:
> On 1 Jul 2012, at 22:48, git at videolan.org (Ronald S. Bultje) wrote:
> 
> > ffmpeg | branch: master | Ronald S. Bultje <rsbultje at gmail.com> | Fri Jun 22 13:05:21 2012 +0300| [a1245d5ca1bed154a3bf38843b63018ae3544115] | committer: Martin Storsjö
> > 
> > mathematics: Don't use division by zero in NAN/INFINITY macros
> > 
> > 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.
> 
> mathematics.h to my knowledge is an installed header, IMHO this is an API change and changes should not be made looking only at what FFmpeg needs.
> Also at least for INF I believe the correct way is to define it to _HUGE_VAL for MSVC.

  FWIW I fully agree to this reasoning. Additionally I dislike changing
stuff to be be in conflict with the C standard that could easily go off
in the source code of our library users.

  Alexander


More information about the ffmpeg-cvslog mailing list