aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2018-12-31 18:55:09 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2019-01-01 21:11:47 +0100
commit8b1099c288ab162f4316a8c1ae269f216520f52d (patch)
tree33c9426ec14002b72a130036539ce8f4a4d29a7c /libavcodec
parent0505b35a38c5086ab21b4305907d48c35458ad98 (diff)
downloadffmpeg-8b1099c288ab162f4316a8c1ae269f216520f52d.tar.gz
avcodec/dcaenc: Return specific error code from subband_bufer_alloc()
Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/dcaenc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/dcaenc.c b/libavcodec/dcaenc.c
index 4b4ceeff05..34b3e94165 100644
--- a/libavcodec/dcaenc.c
+++ b/libavcodec/dcaenc.c
@@ -136,7 +136,7 @@ static int subband_bufer_alloc(DCAEncContext *c)
(SUBBAND_SAMPLES + DCA_ADPCM_COEFFS),
sizeof(int32_t));
if (!bufer)
- return -1;
+ return AVERROR(ENOMEM);
/* we need a place for DCA_ADPCM_COEFF samples from previous frame
* to calc prediction coefficients for each subband */
@@ -166,8 +166,8 @@ static int encode_init(AVCodecContext *avctx)
int i, j, k, min_frame_bits;
int ret;
- if (subband_bufer_alloc(c))
- return AVERROR(ENOMEM);
+ if ((ret = subband_bufer_alloc(c)) < 0)
+ return ret;
c->fullband_channels = c->channels = avctx->channels;
c->lfe_channel = (avctx->channels == 3 || avctx->channels == 6);