You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
ffmpeg: check avpicture_get_size() retuen value
Fixes CID205018 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
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;
|
||||||
|
Reference in New Issue
Block a user