mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2026-01-24 02:20:56 +01:00
sws_getGaussianVec: check variance and quality
Found-by: Reimar Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
fe573d1a9b
commit
e823e73677
1 changed files with 6 additions and 1 deletions
|
|
@ -1435,7 +1435,12 @@ SwsVector *sws_getGaussianVec(double variance, double quality)
|
|||
const int length = (int)(variance * quality + 0.5) | 1;
|
||||
int i;
|
||||
double middle = (length - 1) * 0.5;
|
||||
SwsVector *vec = sws_allocVec(length);
|
||||
SwsVector *vec;
|
||||
|
||||
if(variance < 0 || quality < 0)
|
||||
return NULL;
|
||||
|
||||
vec = sws_allocVec(length);
|
||||
|
||||
if (!vec)
|
||||
return NULL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue