[FFmpeg-cvslog] aacenc: correctly check returned value
Vittorio Giovara
git at videolan.org
Thu Feb 12 18:11:48 CET 2015
ffmpeg | branch: release/2.5 | Vittorio Giovara <vittorio.giovara at gmail.com> | Wed Dec 17 14:53:43 2014 +0100| [4d74bb24e39fdadd0aed3c3fdb5fa156468c7ea6] | committer: Michael Niedermayer
aacenc: correctly check returned value
(cherry picked from commit 971099ff5a85377579eb5b8d3620e283957f097e)
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4d74bb24e39fdadd0aed3c3fdb5fa156468c7ea6
---
libavcodec/aacenc.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c
index d9c7215..635123e 100644
--- a/libavcodec/aacenc.c
+++ b/libavcodec/aacenc.c
@@ -753,10 +753,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;
@@ -768,7 +768,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[s->options.aac_coder];
More information about the ffmpeg-cvslog
mailing list