aboutsummaryrefslogtreecommitdiffstats
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-10-23 00:22:23 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-10-23 00:22:23 +0200
commit3318d6b940986c92259c5e8ba1f0038ae6aab9f1 (patch)
tree6286d7b48241909ddf43d0839698056b1ddb42af /ffmpeg.c
parentda317efd92561290952a8aa191f1e5ea498a27c4 (diff)
downloadffmpeg-3318d6b940986c92259c5e8ba1f0038ae6aab9f1.tar.gz
ffmpeg: check avpicture_get_size() retuen value
Fixes CID205018 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c2
1 files changed, 2 insertions, 0 deletions
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;