You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
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>
This commit is contained in:
@@ -136,7 +136,7 @@ static int subband_bufer_alloc(DCAEncContext *c)
|
|||||||
(SUBBAND_SAMPLES + DCA_ADPCM_COEFFS),
|
(SUBBAND_SAMPLES + DCA_ADPCM_COEFFS),
|
||||||
sizeof(int32_t));
|
sizeof(int32_t));
|
||||||
if (!bufer)
|
if (!bufer)
|
||||||
return -1;
|
return AVERROR(ENOMEM);
|
||||||
|
|
||||||
/* we need a place for DCA_ADPCM_COEFF samples from previous frame
|
/* we need a place for DCA_ADPCM_COEFF samples from previous frame
|
||||||
* to calc prediction coefficients for each subband */
|
* 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 i, j, k, min_frame_bits;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (subband_bufer_alloc(c))
|
if ((ret = subband_bufer_alloc(c)) < 0)
|
||||||
return AVERROR(ENOMEM);
|
return ret;
|
||||||
|
|
||||||
c->fullband_channels = c->channels = avctx->channels;
|
c->fullband_channels = c->channels = avctx->channels;
|
||||||
c->lfe_channel = (avctx->channels == 3 || avctx->channels == 6);
|
c->lfe_channel = (avctx->channels == 3 || avctx->channels == 6);
|
||||||
|
Reference in New Issue
Block a user