avfilter/vf_v360: fix possible out of range values

This commit is contained in:
Paul B Mahol 2020-10-04 19:06:58 +02:00
parent eaba6cecfb
commit 3a035a8cd2

View File

@ -763,12 +763,12 @@ static inline int mod(int a, int b)
static inline int reflecty(int y, int h)
{
if (y < 0) {
return -y;
y = -y;
} else if (y >= h) {
return 2 * h - 1 - y;
y = 2 * h - 1 - y;
}
return y;
return av_clip(y, 0, h - 1);
}
/**