]> git.sesse.net Git - ffmpeg/commitdiff
Merge commit 'a72d93daa09ffbad2771f1450820941055eaf210'
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 12 Mar 2015 20:30:37 +0000 (21:30 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 12 Mar 2015 20:30:37 +0000 (21:30 +0100)
* commit 'a72d93daa09ffbad2771f1450820941055eaf210':
  mpegvideo_enc: Check AVCodecContext allocation

Conflicts:
libavcodec/mpegvideo_enc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavcodec/mpegvideo_enc.c

index 847b1164b6ed535c08f9dd37033460aa84c522dd,e453ba54229d495d9749381b601d3726d4b8ed22..53f584dac8d03b90b729247c77fef27928506ac0
@@@ -1283,7 -1136,9 +1283,9 @@@ static int estimate_best_b_count(MpegEn
      int64_t best_rd  = INT64_MAX;
      int best_b_count = -1;
  
 -    assert(scale >= 0 && scale <= 3);
+     if (!c)
+         return AVERROR(ENOMEM);
 +    av_assert0(scale >= 0 && scale <= 3);
  
      //emms_c();
      //s->next_picture_ptr->quality;