mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
avfilter/vf_v360: fix possible out of range values
This commit is contained in:
parent
eaba6cecfb
commit
3a035a8cd2
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user