ffmpeg: check avpicture_get_size() retuen value
Fixes CID205018 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
da317efd92
commit
3318d6b940
2
ffmpeg.c
2
ffmpeg.c
@ -664,6 +664,8 @@ static void pre_process_video_frame(InputStream *ist, AVPicture *picture, void *
|
|||||||
|
|
||||||
/* create temporary picture */
|
/* create temporary picture */
|
||||||
size = avpicture_get_size(dec->pix_fmt, dec->width, dec->height);
|
size = avpicture_get_size(dec->pix_fmt, dec->width, dec->height);
|
||||||
|
if (size < 0)
|
||||||
|
return;
|
||||||
buf = av_malloc(size);
|
buf = av_malloc(size);
|
||||||
if (!buf)
|
if (!buf)
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user