Merge commit '971099ff5a85377579eb5b8d3620e283957f097e'
authorMichael Niedermayer <michaelni@gmx.at>
Fri, 19 Dec 2014 03:44:39 +0000 (04:44 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 19 Dec 2014 03:45:32 +0000 (04:45 +0100)
* commit '971099ff5a85377579eb5b8d3620e283957f097e':
  aacenc: correctly check returned value

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

@@@ -768,15 -765,13 +768,16 @@@ static av_cold int aac_encode_init(AVCo
      lengths[1] = ff_aac_num_swb_128[i];
      for (i = 0; i < s->chan_map[0]; i++)
          grouping[i] = s->chan_map[i + 1] == TYPE_CPE;
-     if (ret = ff_psy_init(&s->psy, avctx, 2, sizes, lengths, s->chan_map[0], grouping))
+     if ((ret = ff_psy_init(&s->psy, avctx, 2, sizes, lengths,
+                            s->chan_map[0], grouping)) < 0)
          goto fail;
      s->psypp = ff_psy_preprocess_init(avctx);
 -    s->coder = &ff_aac_coders[2];
 +    s->coder = &ff_aac_coders[s->options.aac_coder];
  
 -    s->lambda = avctx->global_quality ? avctx->global_quality : 120;
 +    if (HAVE_MIPSDSPR1)
 +        ff_aac_coder_init_mips(s);
 +
 +    s->lambda = avctx->global_quality > 0 ? avctx->global_quality : 120;
  
      ff_aac_tableinit();