From: Michael Niedermayer Date: Mon, 22 Oct 2012 22:22:23 +0000 (+0200) Subject: ffmpeg: check avpicture_get_size() retuen value X-Git-Tag: android-x86-4.4-r1~8621 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=3318d6b940986c92259c5e8ba1f0038ae6aab9f1;p=android-x86%2Fexternal-ffmpeg.git ffmpeg: check avpicture_get_size() retuen value Fixes CID205018 Signed-off-by: Michael Niedermayer --- diff --git a/ffmpeg.c b/ffmpeg.c index 46e128a1c6..a0e41bdf23 100644 --- a/ffmpeg.c +++ b/ffmpeg.c @@ -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;