mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-03 05:13:44 +00:00
avfilter/vf_gblur: handle cases when parameters become invalid
This commit is contained in:
parent
b6e8fc1c20
commit
49a1de26ec
@ -207,6 +207,12 @@ static void set_params(float sigma, int steps, float *postscale, float *boundary
|
|||||||
*postscale = pow(dnu / lambda, steps);
|
*postscale = pow(dnu / lambda, steps);
|
||||||
*boundaryscale = 1.0 / (1.0 - dnu);
|
*boundaryscale = 1.0 / (1.0 - dnu);
|
||||||
*nu = (float)dnu;
|
*nu = (float)dnu;
|
||||||
|
if (!isnormal(*postscale))
|
||||||
|
*postscale = 1.f;
|
||||||
|
if (!isnormal(*boundaryscale))
|
||||||
|
*boundaryscale = 1.f;
|
||||||
|
if (!isnormal(*nu))
|
||||||
|
*nu = 0.f;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
|
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
|
||||||
|
Loading…
Reference in New Issue
Block a user