aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/aacenc.c
diff options
context:
space:
mode:
authorVittorio Giovara <vittorio.giovara@gmail.com>2014-12-17 14:53:43 +0100
committerVittorio Giovara <vittorio.giovara@gmail.com>2014-12-18 23:27:14 +0100
commit971099ff5a85377579eb5b8d3620e283957f097e (patch)
tree04c0bbb971e888b415d84406a382ff2fffa65076 /libavcodec/aacenc.c
parentac467d94fa6d9d626f77d4ca8125a5eb1ad5425d (diff)
downloadffmpeg-971099ff5a85377579eb5b8d3620e283957f097e.tar.gz
aacenc: correctly check returned value
CC: libav-stable@libav.org
Diffstat (limited to 'libavcodec/aacenc.c')
-rw-r--r--libavcodec/aacenc.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c
index fa0ac0031a..a28e1a1290 100644
--- a/libavcodec/aacenc.c
+++ b/libavcodec/aacenc.c
@@ -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];