On Sun, Jun 06, 2021 at 04:52:13PM +0200, Anton Khirnov wrote: > Quoting Michael Niedermayer (2021-06-06 15:47:54) > > Fixes: floating point division by 0 > > Fixes: Ticket 8269 > > > > Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc> > > --- > > libavfilter/vf_dctdnoiz.c | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/libavfilter/vf_dctdnoiz.c b/libavfilter/vf_dctdnoiz.c > > index 63b1b29ea2..f09ab19c4d 100644 > > --- a/libavfilter/vf_dctdnoiz.c > > +++ b/libavfilter/vf_dctdnoiz.c > > @@ -568,6 +568,9 @@ static int config_input(AVFilterLink *inlink) > > av_log(ctx, AV_LOG_DEBUG, "threads: [max=%d hmax=%d user=%d] => %d\n", > > MAX_THREADS, max_slice_h, ff_filter_get_nb_threads(ctx), > > s->nb_threads); > > > > + if (!s->nb_threads) > > + return AVERROR(EINVAL); > > + > > I presume the crash happens due to max_slice_h evaluating to 0. Wouldn't > it then make more sense to check max_slice_h directly?
ok will change it to that > Or perhaps clip > it from below rather than failing? the video was 1x1 pixel, maybe i lack imagination but i see no usecase for applying dctdnoiz to a 1x1 video thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Its not that you shouldnt use gotos but rather that you should write readable code and code with gotos often but not always is less readable
signature.asc
Description: PGP signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".