Browse Source

aacenc: correctly check returned value

CC: libav-stable@libav.org
tags/n2.6
Vittorio Giovara 11 years ago
parent
commit
971099ff5a
1 changed files with 4 additions and 3 deletions
  1. +4
    -3
      libavcodec/aacenc.c

+ 4
- 3
libavcodec/aacenc.c View File

@@ -750,10 +750,10 @@ static av_cold int aac_encode_init(AVCodecContext *avctx)

s->chan_map = aac_chan_configs[s->channels-1];

if (ret = dsp_init(avctx, s))
if ((ret = dsp_init(avctx, s)) < 0)
goto fail;

if (ret = alloc_buffers(avctx, s))
if ((ret = alloc_buffers(avctx, s)) < 0)
goto fail;

avctx->extradata_size = 5;
@@ -765,7 +765,8 @@ static av_cold int aac_encode_init(AVCodecContext *avctx)
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];


Loading…
Cancel
Save