[FFmpeg-devel] avfilter/af_astats: Avoid Zero division in print part.

Martin Vignali martin.vignali at gmail.com
Sun Mar 8 10:47:23 CET 2015

The divide-by-zero in channel part is not executed, when there is no sound
(like with file i put in attach in m previous email)
because, nb_channels = 0 in this case, so the for loop is not executed.

2015-03-08 10:36 GMT+01:00 Nicolas George <george at nsup.org>:

> L'octidi 18 ventôse, an CCXXIII, Paul B Mahol a écrit :
> > Yes, it gives me floating exception. Looks like uninit() is called
> > unconditionally.
> Of course uninit() is called unconditionally. But it should not crash, and
> I
> re-checked here and it does not crash indeed.
> This change seems very wrong to me, you have the very same divide-by-zero
> in
> the per-channel case, just above your test, there is no reason for one to
> crash and not the other.
> Regards,
> --
>   Nicolas George
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

More information about the ffmpeg-devel mailing list