ffmpeg | branch: master | Vittorio Giovara <vittorio.giov...@gmail.com> | Wed 
Mar 11 19:46:29 2015 +0000| [a72d93daa09ffbad2771f1450820941055eaf210] | 
committer: Vittorio Giovara

mpegvideo_enc: Check AVCodecContext allocation

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a72d93daa09ffbad2771f1450820941055eaf210
---

 libavcodec/mpegvideo_enc.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index 38c42fe..e453ba5 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -1136,6 +1136,8 @@ static int estimate_best_b_count(MpegEncContext *s)
     int64_t best_rd  = INT64_MAX;
     int best_b_count = -1;
 
+    if (!c)
+        return AVERROR(ENOMEM);
     assert(scale >= 0 && scale <= 3);
 
     //emms_c();

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

Reply via email to