Commit 3318d6b9 authored by Michael Niedermayer's avatar Michael Niedermayer

ffmpeg: check avpicture_get_size() retuen value

Fixes CID205018
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent da317efd
...@@ -664,6 +664,8 @@ static void pre_process_video_frame(InputStream *ist, AVPicture *picture, void * ...@@ -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;
......
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