Module: libav Branch: master Commit: a72d93daa09ffbad2771f1450820941055eaf210
Author: Vittorio Giovara <[email protected]> Committer: Vittorio Giovara <[email protected]> Date: Wed Mar 11 19:46:29 2015 +0000 mpegvideo_enc: Check AVCodecContext allocation --- 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(); _______________________________________________ libav-commits mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-commits
