From 719f37026a42bb848aa329dd4a6e5962ce336851 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 1 Sep 2008 00:28:51 +0000 Subject: [PATCH] Check ff_init_me()s return value. Originally committed as revision 15137 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/mpegvideo_enc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c index f7600be..5f18818 100644 --- a/libavcodec/mpegvideo_enc.c +++ b/libavcodec/mpegvideo_enc.c @@ -2775,7 +2775,8 @@ static int encode_picture(MpegEncContext *s, int picture_number) ff_update_duplicate_context(s->thread_context[i], s); } - ff_init_me(s); + if(ff_init_me(s)<0) + return -1; /* Estimate motion for every MB */ if(s->pict_type != FF_I_TYPE){ -- 2.7.4