mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-23 19:30:05 +00:00
swscale: Check memory allocations
CC: libav-stable@libav.org Bug-Id: CID 1267888 / CID 1267890 Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
This commit is contained in:
parent
3035d21b5a
commit
e51f22122d
@ -1382,6 +1382,15 @@ SwsFilter *sws_getDefaultFilter(float lumaGBlur, float chromaGBlur,
|
|||||||
filter->chrV = sws_getIdentityVec();
|
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) {
|
if (chromaSharpen != 0.0) {
|
||||||
SwsVector *id = sws_getIdentityVec();
|
SwsVector *id = sws_getIdentityVec();
|
||||||
sws_scaleVec(filter->chrH, -chromaSharpen);
|
sws_scaleVec(filter->chrH, -chromaSharpen);
|
||||||
|
Loading…
Reference in New Issue
Block a user