ffmpeg: check avpicture_get_size() retuen value

Fixes CID205018
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2012-10-23 00:22:23 +02:00
parent da317efd92
commit 3318d6b940
1 changed files with 2 additions and 0 deletions

View File

@ -664,6 +664,8 @@ static void pre_process_video_frame(InputStream *ist, AVPicture *picture, void *
/* create temporary picture */
size = avpicture_get_size(dec->pix_fmt, dec->width, dec->height);
if (size < 0)
return;
buf = av_malloc(size);
if (!buf)
return;