Merge commit '1411f073fdceeff1f39dbaa035c3c0275f69095f' into release/2.4
authorMichael Niedermayer <michaelni@gmx.at>
Sat, 17 Jan 2015 22:08:10 +0000 (23:08 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 17 Jan 2015 22:08:10 +0000 (23:08 +0100)
* commit '1411f073fdceeff1f39dbaa035c3c0275f69095f':
  aacenc: correctly check returned value

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

@@@ -761,15 -765,13 +761,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];
 +
 +    if (HAVE_MIPSDSPR1)
 +        ff_aac_coder_init_mips(s);
  
 -    s->lambda = avctx->global_quality ? avctx->global_quality : 120;
 +    s->lambda = avctx->global_quality > 0 ? avctx->global_quality : 120;
  
      ff_aac_tableinit();