diff --git a/libavcodec/dcaadpcm.c b/libavcodec/dcaadpcm.c index 8742c7ccf6..cc82241a5f 100644 --- a/libavcodec/dcaadpcm.c +++ b/libavcodec/dcaadpcm.c @@ -215,6 +215,9 @@ av_cold int ff_dcaadpcm_init(DCAADPCMEncContext *s) return -1; s->private_data = av_malloc(sizeof(premultiplied_coeffs) * DCA_ADPCM_VQCODEBOOK_SZ); + if (!s->private_data) + return AVERROR(ENOMEM); + precalc(s->private_data); return 0; }