Merge commit '68811a41c70f019bde6df2a4f289674228c48958'
authorClément Bœsch <u@pkh.me>
Tue, 21 Mar 2017 12:01:46 +0000 (13:01 +0100)
committerClément Bœsch <u@pkh.me>
Tue, 21 Mar 2017 12:01:46 +0000 (13:01 +0100)
* commit '68811a41c70f019bde6df2a4f289674228c48958':
  mpegvideo_enc: use the new encoding API for b_strategy=2

Merged-by: Clément Bœsch <u@pkh.me>
1  2 
libavcodec/mpegvideo_enc.c

@@@ -1455,9 -1277,7 +1465,7 @@@ static int estimate_best_b_count(MpegEn
      int best_b_count = -1;
      int ret = 0;
  
-     if (!c)
-         return AVERROR(ENOMEM);
 -    assert(scale >= 0 && scale <= 3);
 +    av_assert0(scale >= 0 && scale <= 3);
  
      //emms_c();
      //s->next_picture_ptr->quality;
  
              s->mpvencdsp.shrink[scale](s->tmp_frames[i]->data[0],
                                         s->tmp_frames[i]->linesize[0],
 -                                       pre_input.f->data[0],
 +                                       data[0],
                                         pre_input.f->linesize[0],
-                                        c->width, c->height);
+                                        width, height);
              s->mpvencdsp.shrink[scale](s->tmp_frames[i]->data[1],
                                         s->tmp_frames[i]->linesize[1],
 -                                       pre_input.f->data[1],
 +                                       data[1],
                                         pre_input.f->linesize[1],
-                                        c->width >> 1, c->height >> 1);
+                                        width >> 1, height >> 1);
              s->mpvencdsp.shrink[scale](s->tmp_frames[i]->data[2],
                                         s->tmp_frames[i]->linesize[2],
 -                                       pre_input.f->data[2],
 +                                       data[2],
                                         pre_input.f->linesize[2],
-                                        c->width >> 1, c->height >> 1);
+                                        width >> 1, height >> 1);
          }
      }