Commit 2a1b79d7 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit 'e51f2212'

* commit 'e51f2212':
  swscale: Check memory allocations
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 880cee00 e51f2212
......@@ -1591,6 +1591,15 @@ SwsFilter *sws_getDefaultFilter(float lumaGBlur, float chromaGBlur,
filter->chrV = sws_getIdentityVec();
}
if (!filter->lumH || !filter->lumV || !filter->chrH || !filter->chrV) {
sws_freeVec(filter->lumH);
sws_freeVec(filter->lumV);
sws_freeVec(filter->chrH);
sws_freeVec(filter->chrV);
av_freep(&filter);
return NULL;
}
if (chromaSharpen != 0.0) {
SwsVector *id = sws_getIdentityVec();
sws_scaleVec(filter->chrH, -chromaSharpen);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment