[FFmpeg-devel] utils.c patch to avoid divide by zero

Frank Barchard fbarchard
Wed Aug 26 21:54:48 CEST 2009

On Wed, Aug 26, 2009 at 12:40 PM, Ronald S. Bultje<rsbultje at gmail.com> wrote:
> Hi,
> 2009/8/26 M?ns Rullg?rd <mans at mansr.com>:
>> "Ronald S. Bultje" <rsbultje at gmail.com> writes:
>>> I think you should add an abort() on zero-divides
>> The CPU already does that.
> His patch (essentially) removes that.

..which I guess makes it harder for people to fix their bugs.  hmmm.
So maybe add an assert for debug builds, followed by graceful failure
in release?

I think this problem is fairly wide spread and will take awhile to fix
every codec.
OGG's fix isnt great either... 25 fps is PAL.  More common rates are
23.968 or 29.97 fps.
So we'll get a bit uneven implementation.  If a default were done in
util.c it could be consistent.

More information about the ffmpeg-devel mailing list